Slime1ife
(slime)
August 3, 2021, 10:38pm
#21
yea, let me know if it works…
1 Like
how do you turn it off lol i dont like bugs LOL
Slime1ife
(slime)
August 3, 2021, 10:43pm
#23
What do you mean? @CalGamesDev was talking about they enabled bug fixes that interrupts userinputservice jumprequest and he turned them off.
I have not seen the tutorial myself, but from your post I can infer it probably had a bit of code that got outdated as Roblox updates Studio and makes changes to how code can be formatted (this is the same reason why many older games are no longer working)
I would recommend this tutorial on the Roblox DevHub
indefiniteOptimist:
local UserInputService = game:GetService("UserInputService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://7189582341"
local DoubleJump = humanoid:LoadAnimation(Animation)
local HasDoubleJump = false
local LastJump = tick()
local function jumpRequest(input, typing)
if typing then
return
end
if input.KeyCode == Enum.KeyCode.Space then
if tick() - LastJump >= .2 then
if humanoid:GetState() == Enum.HumanoidStateType.Freefall and not HasDoubleJump then
HasDoubleJump = true
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
DoubleJump:Play()
end
end
end
end
humanoid.StateChanged:Connect(function(old , new)
if new == Enum.HumanoidStateType.Landed then
HasDoubleJump = false
end
if new == Enum.HumanoidStateType.Jumping then
LastJump = tick()
end
end)
UserInputService.InputBegan:Connect(jumpRequest)
All of these replys were awesome thank you so much for you guys help rlly appreciate it