Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so i click a part and then a gui appears?

Asked by 2 years ago

Im new to coding so please don't judge. The code i wrote in the part is :

script.Parent.ClickDetector.MouseClick:connect(function(player) player.PlayerGui.ObbyGui.Enabled = true end)

The name of the screen gui is ObbyGui btw. This was wrote in a local script in workspace.

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

You just made a few mistakes to the script Here is the correct version

script.Parent.ClickDetector.MouseClick:Connect(function()  -- "connect" is old and you shouldn't insert "player" into the function
player.PlayerGui.ObbyGui.Enabled = true 
end)
0
I don't think you can insert local scripts inside parts... Xyternal 247 — 2y
0
You can AIRBORNENicuYT 20 — 2y
Ad

Answer this question