I’m trying to change a player’s jump Height/Power, and I want it to work for both. But my check system isn’t working, have a look
if Humanoid.JumpHeight then
Humanoid:SetAttribute("OriginJumpHeight", Humanoid.JumpHeight)
print(Humanoid.JumpHeight)
else
Humanoid:SetAttribute("OriginJumpHeight", Humanoid.JumpPower)
print(Humanoid.JumpPower)
end
Yes, I know this. But I want to use this script without the hassle while pasting it into other games, that might use jump height. Hence why I’m checking for both. Or if the players settings change midgame
Hey let me give some more info, Since this could break if I use this for what I want to do.
if Humanoid.UseJumpPower == false then
Humanoid:SetAttribute("OriginJumpHeight", Humanoid.JumpHeight)
else
Humanoid:SetAttribute("OriginJumpHeight", Humanoid.JumpPower)
end
This adds attributes to my character
as you can see the jump height is set to 50, but my character is using jump height and not jump power, so it should equal 7.2 . And I use these attributes for most of my scripts. so that every script can change it
I found out why this code above doesn’t work. I’m using a custom character, so even if I set the characters setting on jump power to false it stays true. Do you know how i would fix this