Im Working On A Coin Eating Game (Dont Question)
When They Eat The Coin They Get Coins But There Is A Animation So I Want It When The Animation Finishes They Get The Coins And If The Animation Doesn’t Finish They Don’t Get Any Coins.
But If The Player Spams The Click They Get Spammed With Coins.
local tool = script.Parent
local eatinganimation = tool.EatingAnimation
local eatinganimationFinished = false
tool.Activated:Connect(function()
local Character = tool.Parent
local Humanoid = Character.Humanoid
local AnimationTrack = Humanoid:LoadAnimation(eatinganimation)
AnimationTrack:Play()
wait(1)
eatinganimationFinished = true
if eatinganimationFinished == true then
print("test")
end
end)