Activating gui throw server script with RemoteEvent

I have a part that fires a Remote Event when touched:
image

i want enable gui after touching part.
Local script:
image

image

Btw for future reference you should try using code blocks so people can reference your code

add three of these around your code:

`

(Backticks)

like this:

‘’’
This is some code
‘’’

(yes I’m using single quotes so you can see what to do)

This is some code

Or you can just click the gear icon (if you’re on mobile) and click the Preformatted Text option (make sure you’re on a new line or it’ll only add two backticks)

If you’re on PC, just click the icon that looks like this

</>

AKA a closing HTML tag


Anyways to the main stuff. You’re enabling the GUI in starterGui which if you didn’t know here’s cloned to every player. So it won’t change anything.

You need to change the gui in the player’s unique PlayerGui like this

-- THIS IS A EXAMPLE
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")

PlayerGui.ScreenGui.Enabled = true

Sorry for writing too much lol

thanks for feedback, i really appreciate it, but it gives an error saying: attempt to index nil with “WaitForChild”

1 Like

nvm i managed to fix it. Thanks again :stuck_out_tongue:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.