I need help with making a GUI pop when a Player hits a part

Hi, so I just need help with making a GUI (i already made) come up when a player hits a certain part, I know I would need the .Touched event but I’m not sure if I should use like

 local player = game.Players:GetPlayerFromCharacter(Hit.Parent)
    player.PlayerGui.MapLoadGUI.Frame.Visible = true

Thanks in advance.

There are many tutorials on YouTube, why don’t you check there, it could help.


Omg, I’m so dumb. I forgot about that, lol.

Now, I just feel like an idiot.


1 Like

Just mark it as a solution so people know you’ve figured it out.

1 Like

Don’t use the server for this kind of thing. I wrote a tutorial based on the very attempts of some developers to attempt to modify PlayerGuis on the server-side through part-touched events. Make all of this client-sided and go from there.

Be wary that you don’t assume the truthiness of a return value either. You must always check for non-nils as your getter functions can return nil if something can’t be found.

Requested by topic creator.