I have a problem with Stop(), I can’t use stop the animation but the function can. How I can fix it?
if interact == false and script.Parent.Interact.ProximityPrompt.ActionText == "Hide" then
script.Parent.Interact.ProximityPrompt.Enabled = false
interactpart.Position = interact2.Position
hrp.Anchored = true
humanoid.AutoRotate = false
tween:Play()
wait(0.2)
HUT:Play()
hiding()
elseif interact == true and script.Parent.Interact.ProximityPrompt.ActionText == "Unhide" then
script.Parent.Interact.ProximityPrompt.Enabled = false
interactpart.Position = interact1.Position
IUT:Stop() -- The animation can't stop at this line
UUT:Play()
unhiding()
wait(0.5)
script.Parent.Interact.ProximityPrompt.ActionText = "Hide"
script.Parent.Interact.ProximityPrompt.Enabled = true
end
local function decreaseTimer()
timer = timer - 1
if timer <= 0 then
script.Parent.Interact.ProximityPrompt.Enabled = false
interactpart.Position = interact1.Position
IUT:Stop() -- The animation can stop at this line
UUT:Play()
unhiding()
wait(0.5)
script.Parent.Interact.ProximityPrompt.ActionText = "Hide"
script.Parent.Interact.ProximityPrompt.Enabled = true
return
end
end