Hello, I do not have much knowlege with scripting but have this I did this jumppad.
The jumppad has a delay on jumping tho and I tried much to fix it but nothing worked so does anyone here know why there is a delay and how to fix it?
pad = script.Parent
function jump(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.JumpHeight = 25
humanoid.Jump = true
wait(.5)
humanoid.JumpHeight = 7.2
end
end
pad.Touched:Connect(jump)
Touched has always had a small delay, the way to get around that is people usually use raycast or magnitude. That being said your script would probably work a lot better if it was cleaned up a bit.
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
local hum = hit.Parent.Humanoid
hum.JumpHeight = 25
hum.Jump = true
wait(.5)
hum.JumpHeight = 7.2
end
end)