0

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

Asked by 5 days 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.

0
Answered by 5 days ago
Edited 4 days 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 145 — 5d
0
You can AIRBORNENicuYT 20 — 4d