Blast123b
Blast123b

Reputation: 27

Why is the GUI frame not showing up when I trigger the proximity prompt on Roblox?

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

Answers (2)

KubaDC
KubaDC

Reputation: 31

Called wrong game user interface

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

Speezy
Speezy

Reputation: 50

There are a few possible reasons why the GUI frame is not appearing when the proximity prompt is triggered on Roblox:

  1. 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".

  2. 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.

  3. 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

Related Questions