This script to freeze the character isn't working. Help?
local player = game.Players.LocalPlayer local torso = player:WaitForChild('UpperTorso') torso.Anchored = true
UpperTorso is within the Character, not the Player.
I've created a variable character. The or statement is there in case the script loads before the character does, which would result in an error.
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local torso = character:WaitForChild("UpperTorso") wait(2) torso.Anchored = true
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local head = character:FindFirstChild("Head") or character:WaitForChild("Head") head.Anchored = true
or
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:FindFirstChild("Humanoid") or character:WaitForChild("Humanoid") local canjump = false humanoid.WalkSpeed = 0 humanoid:GetPropertyChangedSignal("Jump"):Connect(function() if canjump == false then humanoid.Jump = false end end)
or
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:FindFirstChild("Humanoid") or character:WaitForChild("Humanoid") if humanoid.RigType == Enum.HumanoidRigType.R15 then local uppertorso = character:FindFirstChild("UpperTorso") or character:WaitForChild("UpperTorso") uppertorso.Anchored = true elseif humanoid.RigType == Enum.HumanoidRigType.R6 then local torso = character:FindFirstChild("Torso") or character:WaitForChild("Torso") torso.Anchored = true end