So I have a touch script and when you touch a part if shows a GUI. This is a local script in the Starter GUI and when you touch the spawn, it shows a GUI on everybody screens. How do I make it so it only shows it on the player who touched it?
Script:
game.Workspace.SpawnLocation.Touched:Connect(function() script.Parent.TeamGUI.ChooseFrame.Visible = true end)
Maybe try using remote events:
MAKE SURE TO CREATE A REMOTE EVENT IN REPLICATED STORAGE CALLED: "RemoteEvent"!
Also put a serverscript inside the part
Server Script(inside the part)
script.Parent.Touched:Connect(function(touch) local plr = game.Players:GetPlayerFromCharacter(touch.Parent) game.ReplicatedStorage.RemoteEvent:FireClient(plr) end)
Local script(inside StarterPlayer.StarterPlayerScripts)
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() script.Parent.Parent.PlayerGui.ScreenGui.Frame.Visible = true end)