wait(20) --I thought the script loaded before the server so I added a wait time of 25 print("5") wait(5) part=game.Workspace.PartOne --The part that changes the Gui when it is touched print("PartOne found") player=game.Players.LocalPlayer print("Player found") print(player) function touched() player.PlayerGui.ScreenGuiOne.Frame.Visible=false wait() player.PlayerGui.ScreenGuiTwo.Frame.Visible=true print("Text two.") end part.Touched:connect(touched)
It works in solo mode but whenever I play in multiplayer (1 person server) the Gui does not change. I've tried waiting 25 seconds before it searches for the player but it still doesn't work.
You have used this property of a local script
player=game.Players.LocalPlayer
For this code to work, it must be placed within a localscript within the Player (so either put it in StarterGui or clone it into the player using :Clone() )