howdy fellow developers, i have a bug where the animation is not stopping after it reached to the point
example of this video:(idk if the video plays on you)
any idea how to fix this
also the animation were on the server-sided
local rightArm = charTouched["Right Arm"]
local wc = Instance.new("Motor6D")
wc.Part0 = rightArm
wc.Part1 = flagOnBack.PrimaryPart
wc.Parent = rightArm
if charTouched:WaitForChild("Humanoid") then
charTouched:WaitForChild("Humanoid").WalkSpeed += 8
end
flagrunAnim:Play()
flagOnBack.Name = "FLAG"
flagOnBack.Parent = charTouched
for i, desc in pairs(team1Flag.FlagModel:GetDescendants()) do
if desc:IsA("BasePart") then
desc.Transparency = 1
desc.CanCollide = false
end
end
charTouched.Humanoid.Died:Wait()
if flag1Taken == charTouched then
disableBackpackEvent:FireClient(plrTouched, true)
flag1Taken = false
for i, desc in pairs(team1Flag.FlagModel:GetDescendants()) do
if desc:IsA("BasePart") then
desc.Transparency = 0
end
end
end
elseif flag2Taken == charTouched and charTouched.Humanoid.Health > 0 and plrTouched.Team == team1 then
disableBackpackEvent:FireClient(plrTouched, true)
flag2Taken = false
charTouched["FLAG"]:Destroy()
team1Score.Value += 1
flagrunAnim:Stop() --something wrong here
for i, desc in pairs(team2Flag.FlagModel:GetDescendants()) do
if desc:IsA("BasePart") then
desc.Transparency = 0
desc.CanCollide = false
end
end
if charTouched:WaitForChild("Humanoid") then
charTouched:WaitForChild("Humanoid").WalkSpeed -= 8
end
end