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

When the HumanoidRootPart is anchored, how do I stop the animations from playing?

Asked by 4 years ago
script.Parent.Touched:connect(function(hit)
    local config = script.Parent.Configuration
    if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent)then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
            script.Parent.CanCollide = false
            wait(1)
            script.Parent.CanCollide = true
        else
            hit.Parent.HumanoidRootPart.Position = Vector3.new(-6.2, 0.5, -5.8) + Vector3.new(0,3,0)
            hit.Parent.HumanoidRootPart.Anchored = true
            wait(5)
            hit.Parent.HumanoidRootPart.Anchored = false
        end
    end
end)
0
I usually just disable the scripts lol....likely not the best way id think. ForeverBrown 356 — 4y
0
What do you mean by that? ISkyLordDoge 37 — 4y
0
they mean scripts have a disabled property set that to true Lazarix9 245 — 4y

Answer this question