Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

2 comments

0

I don't think you can insert local scripts inside parts...

0

You can

This discussion is preserved as it was. New answers, comments, and votes are closed.