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

ClickDetector GUI not opening and I don't have any errors ??????

For some reason, this GUI opener isn't working. This is a localscript. Nothing is appearing at all. No errors? This is making me really mad.

local clickdetector = game.Workspace.SELECT.ClickDetector
clickdetector.MouseClick:Connect(function()
    game.Players.LocalPlayer:WaitForChild('PlayerGui').SpawnCar.Enabled = true
end)

1 comment

0

(Just a comment and advice) The MouseClick event passes the parameter or the player so you don't need to get the local player. I would also recomend you write this in a script instead of a LocalScript.

1 answer

✓ Accepted answer

with the MouseClick you don't have to find the player. you put a word in the parenthesis ex player and then just do player:WaitForChild etc. also i think if your trying to make a gui apear you would use visible and not enabled. also use a normal script. here should be the fixed script:

local clickdetector = game.Workspace.SELECT.ClickDetector
clickdetector.MouseClick:Connect(function(player)
    player:WaitForChild('PlayerGui').SpawnCar.Visible = true
end)

4 comments

0

Visible is not a properly in StarterGui. It’s Enabled. There is a close button out of my Frame so it wouldn’t work.

0

I meant ScreenGui*

0

I meant ScreenGui*

0

I meant ScreenGui*

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