I used The_Envelope's script at https://scriptinghelpers.org/questions/32057/how-do-i-find-a-players-character-using-the-touched-event, and I want to use that to change JumpPower to 0. Like when you hit the part, you can no longer jump. I also have the script from https://www.youtube.com/watch?v=-g05k6iUfhA to get an understanding. Please help, no rush though :)
✓ ANSWER ACCEPTED
How do I make a permission to change JumpPower to 0 via touching a part?
1 answer
✓ Accepted answer
If you put this in a script in a part, it will do what you're looking for. I added comments to a few lines to explain what I'm doing.
local part = script.Parent
part.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid") -- attempt to index character's humanoid
if humanoid then -- if humanoid exists (if a player touched) then...
humanoid.JumpPower = 0 -- set JumpPower to 0
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
This wouldn't work if the player reset their character.
Thank you!