Young to scripting and can't figure this out. So I made this script and when the player comes in touch with Part, it disables his/her JumpPower. Now, I can put another script in the part called "EnableJump" and simply change "hum.JumpPower = 0" to 50 but I don't want to use many scripts. How can I make it so that this script does its job, sets the player's JumpPower to 0 and then waits for the player to touch EnableJump and when EnableJump is touched the JumpPower goes back up to 50.
local EnableJump = script.Parent.Parent.Parent.Four.EnableJump
function touch(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum.JumpPower = 0
-- MISSING PART
end
end
script.Parent.Touched:Connect(touch)

1 comment
i don't know how to solve this