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

Click GUI Won't Become Visible After Clicked?

Asked by 5 years ago

So I want a script that when a block is clicked, a gui appears on screen. I have created a script here, but I don't know what I'm doing wrong. Please explain and correct my mistake, thanks in advance! script:

 function onClicked()
    wait(0)
 player = game.Players.LocalPlayer
 player.PlayerGui.ScreenGui.ToDoList1.TextBox.Visible = true

 end


 script.Parent.ClickDetector.MouseClick:connect(onClicked)
0
is this a local script User#23365 30 — 5y
0
it should be a local script theking48989987 2147 — 5y
0
It wasn't, but I changed it and its still not working. The gui is in StarterGui, is that the wrong place? Darkcraft10 20 — 5y
0
it should not be a local script, in its current form it should be a script placed inside of the block itself..in which you should not use LocalPlayer, instead use the first argument of MouseClick..you should also use a remote event to make the textbox visible Vulkarin 581 — 5y
0
Thank you! Darkcraft10 20 — 5y

Answer this question