Why Isn't this player override script working?
local t = script.Parent.Torso -- NOTE: When the tazer hits the player the script's parent is the character
local w = script.Parent:GetChildren()
local h = nil
for i = 1, #w do
if w[i].ClassName == "Humanoid" then h = w[i] end
end
t.CFrame = CFrame.new(t.Position.x,t.Position.y,t.Position.z,0,-1,0,0,0,-1,1,0,0)
h:UnequipTools()
h.Sit = true
function OnAttempt()
t.CFrame = CFrame.new(t.Position.x,t.Position.y,t.Position.z,0,-1,0,0,0,-1,1,0,0)
h.WalkSpeed = 0
h.Sit = true
end
local c = h.Jumping:connect(OnAttempt)
local c2 = h.GettingUp:connect(OnAttempt)
local c3 = h.Running:connect(OnAttempt)
h.Jump = true
while true do
h:UnequipTools()
wait()
end