I need help, I need a script that does a jump delay + jump power script, Credit on the script bellow to @WideSteal321
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) if char:WaitForChild("Humanoid") then print("working ok????????????????????????????????????????????????") end char.Humanoid.Changed:Connect(function(jumppppp) if char.Humanoid.Jump == true then char.Humanoid.JumpPower = 0 print(char.Humanoid.JumpPower) wait(2.9) char.Humanoid.JumpPower = 50 print(char.Humanoid.JumpPower) wait() end end) end) end)
You can use UserInputService to detect a jump and StateChanged to tell whether or not you're allowed to jump. To find the delay, subtract now (tick) from the last jump time.
local me = game:GetService('Players').LocalPlayer local character = me.Character local humanoid = character:WaitForChild("Humanoid") local uis = game:GetService('UserInputService') local canjump = false local last = tick() local delaytime = 1 humanoid.JumpPower = 0 humanoid.StateChanged:Connect(function(old, new) if new == Enum.HumanoidStateType.Landed then -- make sure we're on the floor canjump = true elseif new == Enum.HumanoidStateType.Freefall then canjump = false end end) local function jump() if tick() - last >= delaytime and canjump then print("do the thing") humanoid.JumpPower = 50 delay(.25, function() humanoid.JumpPower = 0 end) last = tick() end end uis.JumpRequest:Connect(jump)
Closed as Not Constructive by DinozCreates and User#24403
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?