HubMong
(HubMong)
August 8, 2021, 6:22am
#1
Hello fellow developers!
I am a novice developer developed roblox games for several months.
Now I am writing a simple local script parented to a wing tool
with which a player can jump higher.
The code is simple but always the error message:
'attempt to index nil with “JumpPower” ’ is shown and I don’t know why.
I will appreciate if someone help me.
Ryuunske
(Ryuunske)
August 8, 2021, 6:26am
#2
Instead of making a variable for jump power > try just setting it.
hum.JumpPower = 200
2 Likes
Rodtodon
(Rodtodon)
August 8, 2021, 6:28am
#3
The error is telling you that you’re trying to get the JumpPower of nothing because your hum
variable is nil. Try using local hum = chr:WaitForChild("Humanoid")
to make the script yield until the Humanoid exists.
2 Likes
HubMong
(HubMong)
August 8, 2021, 6:39am
#4
Thank you for your quick help. It is ok now!
1 Like
Please mark the most helpful solution as the correct one so other people can easily find the fix if they similar problems.
HubMong
(HubMong)
August 8, 2021, 9:17am
#6
Yes, I did. I marked Rodtodon’s reply as Solution