I want to open a frame using ClickDetector, but is going wrong and I don’t know why.
Here’s the script
script.Parent.ClickDetector.MouseClick:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true
end)
I want to open a frame using ClickDetector, but is going wrong and I don’t know why.
Here’s the script
script.Parent.ClickDetector.MouseClick:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true
end)
Is this a local script? If it isn’t, that is because the server cannot access a player’s GUI. And if the local script isn’t in the local player scripts, it simply won’t detect anything.
It’s a local script, I already tried using the Remote Events and change in a server script (using the PlayerGui of the player that the remote event detect.
But isn’t activing the remote event.
Where is the local script located?
inside the part that has the ClickDetector
Okay. Like I said earlier, you can’t have a local script in a part. Try using a local script in StarterPlayerScripts and referencing the click detector there.
Still not working (I changed the path going to the ClickDetector)
Then try using the script in the StarterGui? Make sure it stays local.
Nice! I’m glad it worked for you!