Hello everyone,
Right now I’m facing an issue with my game, and i can’t find a solution to it since it doesn’t really make sense to me.
local Player = game.Players.LocalPlayer
script.Parent.Touched:Connect(function(hit)
hit.Parent.HumanoidRootPart.Position = game.Workspace.Restarter1.Position
hit.Parent.Humanoid.WalkSpeed = 0
Player.PlayerGui.WrongGui.WRONGScript.Disabled = false -- Error here
wait(1)
hit.Parent.Humanoid.WalkSpeed = 20
end)
Apparently, if you take a look at the script, you’ll notice that I’ve referenced the “LocalPlayer” in the first line of the code, and used that to get to the player’s Gui and Enable a script.
But for some reason, it stops at the 6th line and give’s me an error message in the output, as shown in the image:
I’ve tried writing down the code in different ways and even changed the script type and the parent, nothing seems to work.
I would appreciate some help if you can.
Thank You.