local UIS = game:GetService("UserInputService")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://6745226472"
local loadanim = script.Parent:WaitForChild("Humanoid").Animator:LoadAnimation(anim)
loadanim:AdjustWeight(math.huge)
local debounce = false
UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if debounce == false then
debounce = true
loadanim:Play()
loadanim.Stopped:Wait()
print(debounce)
end
debounce = false
end
end)
Probably a inefficient way of doing it, but try temporarily setting the walk AnimationID to nothing for a brief moment, then setting it back after the animation is done
local UIS = game:GetService("UserInputService")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://6745226472"
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Animate = Character:WaitForChild("Animate")
local WalkAnimation = Animate:WaitForChild("walk")
local DefaultID = WalkAnimation.Value
local loadanim = script.Parent:WaitForChild("Humanoid").Animator:LoadAnimation(anim)
loadanim:AdjustWeight(math.huge)
local debounce = false
UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if debounce == false then
debounce = true
WalkAnimation.Value = ""
loadanim:Play()
loadanim.Stopped:Wait()
print(debounce)
WalkAnimation.Value = DefaultID
end
debounce = false
end
end)