I’m sorry if this isn’t right, this is my first post.
You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
My animation to play once -
What is the issue? Include screenshots / videos if possible!
My animation keeps playing when the proximity prompt is pressed
https://gyazo.com/50d4acaae96b116c71c04b83bce650f4 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, everything I have seen so far has not worked
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
the script:
local Anim = script:WaitForChild("Animation")
ProximityPrompt.Triggered:Connect(function(plr)
local hum = plr.Character:WaitForChild("Humanoid")
local loadAnim = hum.Animator:LoadAnimation(Anim)
loadAnim:Play()
Anim.Looped = false
end)
i have just tried to script it again another way, same thing is happening
local prompt = script.Parent.ProximityPrompt
local anim = script.Parent.Animation
prompt.Triggered:Connect(function(player)
local hum = player.Character:WaitForChild("Humanoid")
local loadAnim = hum.Animator:LoadAnimation(anim)
loadAnim:Play()
end)