#weird goofy bug

11 messages · Page 1 of 1 (latest)

jaunty abyss
#

why is the zombie rolling when i add a weld constraint to him

#

like this..

#

and whats even weirder is that the orientation of the zombie doesnt change

hushed shale
jaunty abyss
#

forgor

#
function mob.Attack(zombie)
    while task.wait() do
        if zombie.PrimaryPart then
            if zombie.Name == "Spitter" then
                local speed = zombie:GetAttribute("Speed")
                while task.wait() do
                    local anim = zombie.AnimationController.Animator:LoadAnimation(zombie.Animations.Attack)
                    zombie:SetAttribute("Speed", speed)
                    task.wait(zombie:GetAttribute("SpitCooldown"))
                    local vomit = game.ReplicatedStorage.Effects.Vomit:Clone()
                    local weld = Instance.new("WeldConstraint", vomit)
                    weld.Part0 = vomit
                    weld.Part1 = zombie.PrimaryPart
                    vomit.CanCollide = false
                    vomit.Anchored = false
                    vomit.Parent = workspace
                    zombie:SetAttribute("Speed", 0)
                    game.ReplicatedStorage.Events.StopAnim:FireAllClients(zombie, "Walk")
                    anim:Play()
                    task.wait(zombie:GetAttribute("SpitCooldown"))
                    anim:Stop()
                end
            end
        end
    end
end
#

also the movement is simple the zombie just moves by align position and stuff

#

everything works fine

#

but i dont know why weld constraint does funky stuff

#

to the zombie