Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont the animation play in this script, and could ive done it easier?

Can i some how add debounce or something to make animation play or?

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")
local Humanoid = Character.Humanoid


local Tapped = false
local T = 0.5

local DashNapredAnim = Instance.new("Animation")
 DashNapredAnim.AnimationId = 'rbxassetid://04783114765'
 PlayDashNapredAnim = Humanoid:LoadAnimation(DashNapredAnim)

UserInputService.InputBegan:Connect(function(input, gameprocesed)
	if input.KeyCode == Enum.KeyCode.W then
		if not Tapped then
			Tapped = true
			wait(T)
			Tapped = false
		else  
			PlayDashNapredAnim:Play()
			Character.HumanoidRootPart.Velocity = Character.HumanoidRootPart.CFrame.LookVector*150-Vector3.new(0,10,0) 
			end
		end
    end)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.