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

for some reason after freezing my character and unfreeze it, it stays frozen?

Asked by 2 years ago

here's the part of the script that isn't working. When I play this animation it stops the player to play it and then you wait some time for it to unfreeze, but when I do it the player is just stuck there????

local StartUpAnimation = hum:LoadAnimation(script.StartUp)
        local SUW = script.StartUpWoosh
        local hitBox =  game.ServerStorage.HitBox:Clone()
        hitBox.Parent = workspace
        hitBox.CFrame = humrp.CFrame + humrp.CFrame.LookVector*3
        game.Debris:AddItem(hitBox,1)

        local weld = Instance.new("WeldConstraint",hitBox)
        weld.Part0 = humrp
        weld.Part1 = hitBox

        SUW:Play()
        StartUpAnimation:Play()

        local FreezeSU =  Instance.new("BodyVelocity")
        FreezeSU.Parent = humrp
        FreezeSU.Velocity = humrp.CFrame.LookVector*.001
        FreezeSU.MaxForce = Vector3.new(100000,100000,100000)

        wait(.4)

        game.Debris:AddItem(FreezeSU,0)


0
Did you check if the hitbox gets deleted? Also adding objects to debris with small life-times might be a performance issue. enes223 327 — 2y

Answer this question