wait(5) local player = game.Players.LocalPlayer player.Character.Humanoid.WalkSpeed = 18 local keep = game.ReplicatedStorage.Electricity:Clone() keep.Parent = player.Character.Humanoid.Torso player.Character.Humanoid.Touched:Connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then local Name = game.Players:GetPlayerFromCharacter(Hit.Parent) if Name.Name ~= player.Name then local Backup =Name:WaitForChild("PlayerScripts").ControlScript:Clone() Name.PlayerScripts.ControlScript:Destroy() print("NICE") wait(2) Backup.Parent =Name.PlayerScripts wait(5) end end end)
So, on the "if Hit.Parent:FindFirstChild("Humanoid") then" I am getting an infinite yeild. Previously, i didn't even add find first child and it said playerscripts is not apart of player.
But obviously, playerscripts is apart of the player. What is wrong here?
Also, can i affect another player with a local scrip, such as disabling them, as done here?
Clients can't access anyone's PlayerScripts, nor can the server. With filtering enabled none of this would work anyway.