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

Won't work online ??? Zombie grab script [FIXED]

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Hello, my problem is : my zombie grab script works in solo mode, but not in online mode. Also, there's no error output. Here is the script :

wait (1)
local Debounce = true

script.Parent.Touched:connect(function(Dude)
        wait (1)
        if Debounce == false then return end
        if Dude.Parent:FindFirstChild("Humanoid")~= nil and Dude.Parent:FindFirstChild("Human") ~= nil and Dude.Name == "Front" then
        if Dude.Parent.Human.FrontGrabbed.Value == false then
        Dude.Parent.Human.FrontGrabbed.Value = true
        Dude.Parent.Human.HMZ.Value = Dude.Parent.Human.HMZ.Value + 1
        Debounce = false
        game.Lighting.ZombieFrontGrab:Clone().Parent = Dude.Parent
        local Victim = Dude.Parent
        script.Parent.Parent.Pathfinding.Disabled = true
        script.Parent.Parent.Zombie.WalkSpeed = 0
        local Animation = script.Parent.Parent.Zombie:LoadAnimation(script.Parent.Parent.Zombie.BiteFront)
        Animation:Play()
        wait (1)
        script.Parent.Parent.Torso.Bite:Play()
        wait (1.46)
        script.Parent.Parent.Torso.Bite:Play()
        wait (1)
        script.Parent.Parent.Pathfinding.Disabled = false
        script.Parent.Parent.Zombie.WalkSpeed = 6
        Dude.Parent.Human.HMZ.Value = Dude.Parent.Human.HMZ.Value - 1
        wait (2.3)
        Debounce = true
        Dude.Parent.Human.FrontGrabbed.Value = false
        Debounce = true
    end
    end
    end)

Thank you for helping me !

0
FilteringEnabled is false and it's in a server script. haloelite27 25 — 8y
0
You should put line 11 after line 6, and line 29 after line 31 with a wait above it. If you do not do this there will be a high chance of your debounce failing quite often. User#11440 120 — 8y
0
still don't work. I added "print "Check[number]" at some places and it stop working at line 7. haloelite27 25 — 8y

Answer this question