local script
game.Workspace.Checkpoints.Stage1.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then game.ReplicatedStorage.ShowGUI:FireServer(game.Players:GetPlayerFromCharacter(hit.Parent)) end end)
local script
game.ReplicatedStorage.ShowGUI.OnClientEvent:Connect(function() script.Parent.Frame.Visible = true end)
Please give an explanation, I am new to scripting so I won't understand otherwise. Thanks!
Your first LocalScript has to be a regular script, inside ServerScriptService.
You can just use the local script to check if a part has been touched locally.
game.Workspace.Checkpoints.Stage1.Touched:Connect(function(hit) if game.Players[hit.Parent.Name] == game.Players.LocalPlayer then script.Parent.Frame.Visible = true end end)
Also, local scripts only work when they're in the playergui, playerscripts, backpack and character. They will not execute anywhere else including serverscriptstorage or workspace.