Hello,

So i have been scripting my game and i have come upon this small problem which i'm not to sure how to fix. In this script i want once you click a button the button turns green and a GUI pops up. I tried this way but it still wont work:

The problem is the gui wont pop up

Local Script in click detector:

local plr = game.Players.LocalPlayer



game.ReplicatedStorage.PowerOnEvent.OnServerEvent:Connect(function()
	
plr.PlayerGui.Tutorial.Enabled = true``
end)

Could someone please help me with this problem.

10 comments

0

You have no FireServer() to activate the RemoteEvent. Rookie mistake.

0

The part that wont work is the gui wont pop up

0

You still aren't using the RemoteEvent correctly. If you want to fire from the local script in the ClickDetector to a server script, FireServer() must be in the local script. No wonder why it isn't working.

0

You're also better off receiving the ClickDetector's MouseClick event from the server then firing to the client.

0

The fire server is being fired in a local script

0

Where is the script located?

0

in a local script u dont use OnServerEvent, instead u use OnClientEvent

0

I will test it out.

0

@Gameplayer365247v2 Stop with the bad answers.

0

@RobloxWhizYT the local script is in starterGui