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
script.Parent.Touched:connect(function(Hit)
local player = game.Players:GetPlayerFromCharacter(Hit.Parent)
player.PlayerGui.MapLoadGUI.Frame.Visible = true
end
end)
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.