Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why Isn't this player override script working?

Asked by 5 years ago
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

0
Lots of connects with lowercase 'c's here, try to fix that lmao cmgtotalyawesome 1418 — 5y
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. User#24403 69 — 5y

Answer this question