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

2 comments

0

Lots of connects with lowercase 'c's here, try to fix that lmao

0

I answered your other question and you said "thanks", would you mind accepting my answer? It gives the both of us some reputation, and really helps out.