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

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

Asked by 4 years ago

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)
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. uhi_o 417 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

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)
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. squidiskool 208 — 4y
0
I meant ScreenGui* squidiskool 208 — 4y
0
I meant ScreenGui* squidiskool 208 — 4y
0
I meant ScreenGui* squidiskool 208 — 4y
Ad

Answer this question