still not working even after changing it to what you said, is there an easier way to change it, since I will be changing it constantly to make it efficient, like defining characterjumpheight directly and changing the values?
I looked at the thread and it seemed to work fine while using a debounce, however I am still having issues, all I want to do is run a function, then in the middle of the function I want to disable jumping for 10 seconds, then re-enable it, I am not the best scripter, please can you show me the code,
that would be helpful
It may be that local h = hit.Parent.findFirstChild("Humanoid") is your issue.
Try
print(h.Name) after that line to see what is hitting the Part.
If it’s not registering anything you’ve got to see why the function isn’t being called in your script. It may be inside a section of code that isn’t running.
local debounce = false
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid and not debounce then
debounce = true
humanoid.UseJumpPower = true
humanoid.JumpPower = 0
task.wait(10)
humanoid.JumpPower = 50
debounce = false
end
end)