Reputation: 27
Why is the GUI not showing up when I fire the client? I'm not very good at Roblox scripting.
Local Script:
game.ReplicatedStorage.Events.OpenLoadout.OnClientEvent:Connect(function(player)
game.StarterGui.GunShop.MainFrame.Visible = true
game.Workspace.LoadoutShop.Prompt.Enabled = false
print("Test")
end)
Server Script:
prompt = script.Parent.Prompt
prompt.Triggered:Connect(function(player)
game.ReplicatedStorage.Events.OpenLoadout:FireClient(player)
end)
Upvotes: 0
Views: 3020
Reputation: 31
You have used game.StarterGui.GunShop.MainFrame.Visible = true
which sets the starter gui frame to visible, not the player one.
To fix this, simply change this line to player.PlayerGui.GunShop.MainFrame.Visible
.
Upvotes: 0
Reputation: 50
There are a few possible reasons why the GUI frame is not appearing when the proximity prompt is triggered on Roblox:
The GUI frame may be set to invisible in the Roblox settings. To check if this is the case, go to the Roblox settings menu and make sure that the "GUI Frame" setting is set to "Visible".
The GUI frame may be hidden behind another frame. To check if this is the case, try moving the other frame out of the way or changing the z-order of the frames.
The GUI frame may be off-screen. To check if this is the case, try moving the camera so that the frame is visible on-screen.
Upvotes: 0