When the HumanoidRootPart is anchored, how do I stop the animations from playing?
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)