So first of all I made an event in ServerScriptService to detect when the player touches the part
game.Workspace.PartToTouch.Touched:Connect(function(hit)
if game.Players.GetPlayerFromCharacter(hit.Parent) then
game.ReplicatedStorage.ShowGUI:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)
You donât need to run a Remote Event as itâs client sided, and GUIâs can be changed from clients because you want only the client to see the gui right?
Or if when 1 player touches it u want it to appear on everyone elseâs screen?
game.Workspace.PartToTouch.Touched:Connect(function(hit)
if game.Players.GetPlayerFromCharacter(hit.Parent) then
script.Parent.Frame.Visible = true
end
end)
If youâre confused, Guiâs are meant to be only on one clientâs screen, You can make it appear for all of them tho, but in this case you donât want to
Thats why we are using local script to change the clientâs screen
PS: Donât change the local scripts location as u used before just change the script
Yeah keep the same old local script u used to show us ur example, remove the server script, and only change the text on the local script to what iâve sent
Your script will run every time the player touched the part. If he locally sets the debounce to true and checks for it, then it wonât run again. Alternatively, just destroy the script once heâs done with it locally.