Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ 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)

2 comments

0

This wouldn't work if the player reset their character.

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.