What do you want to achieve? Keep it simple and clear!
Fix an animation issue
What is the issue? Include screenshots / videos if possible!
When I use :Stop on my animation it just keeps playing for some reason
local giving = false
local giveanim = script.give
local hum = Player.Character.Humanoid
local giveanimplay = hum:LoadAnimation(giveanim)
local giveanim = script.give
local hum = Player.Character.Humanoid
local giveanimplay = hum:LoadAnimation(giveanim)
if input.KeyCode == Enum.KeyCode.Q then
if giving == true then
print("really bruh")
giveanimplay:Stop()
giving = false
return end
if giving == false then
giveanimplay:Play()
giving = true
-- local player = game.Players.LocalPlayer
local giving = true
local giveanim = script.give
local hum = Player.Character:WaitForChild("Humanoid")
local giveanimplay = hum:LoadAnimation(giveanim)
game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent then return end
print()
if input.KeyCode == Enum.KeyCode.Q then
if giving == false then
giveanimplay:Play(.5,10)
giving = true
elseif giving == true then
print("really bruh")
giveanimplay:Stop()
giving = false
end
end
end)