ProximityPrompt - Opening UIs

ProximityPrompt - Opening UIs

Hello! So I’ve been attempting to make a (what I thought) was a relatively simple script, so when a ProximityPrompt is activated, it opens a tools menu. However, the only issue I’m currently having is the menu isn’t actually opening. So, if anyone could take a look at the script and suggest a reason as to why, It’d be much appreciated!

script.Parent.Triggered:Connect(function()
	wait(0.1)
	game.StarterGui.ToolMenu.ToolFrame.Visible = true
end)

I’m an extremely inexperienced scripter, as you can probably tell, so I’m hoping the solution is relatively simple and it’s just a case of me making a ‘rookie error’.

Any help would be much appreciated.

1 Like

if you change startergui itll only change what the server sees, not what the player sees, so make sure to get the player argument that triggered returns and use player.PlayerGui

script.Parent.Triggered:Connect(function(player)
	wait(0.1)
	player.PlayerGui.ToolMenu.ToolFrame.Visible = true
end)
1 Like

Thank you so much, a rookie error as I suspected! I’ve just tested it out and it’s working perfecty now, I really appreciate it!

1 Like

Unnessecary wait, not even task.wait?

2 Likes

There’s no reason to use wait() and if you do, use task.wait()

2 Likes

i know, i just copied his code and fixed it without changing anything

1 Like