I got this script from youtube. I tried to make an animation work with it, so that when you double jump, it plays an animation. Here it is:
local character = script.Parent
local humanoid = character:WaitForChild(“Humanoid”)local uis = game:GetService(“UserInputService”)
local animation = Instance.new(“Animation”)
local id = 5554177611
animation.AnimationId = id
animation.Parent = characterlocal candoublejump = false
local haslanded = truehumanoid.StateChanged:Connect(function(previous, new)
if new == Enum.HumanoidStateType.Jumping and haslanded then
if not candoublejump then candoublejump = true; haslanded = false end
elseif new == Enum.HumanoidStateType.Landed then
candoublejump = false haslanded = true
end
end)uis.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Space then
if candoublejump then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) candoublejump = false end
end
end)
I really need some help please!