Hey there, so I’m having an issue with a “Jump Boost” script on studio which doesn’t seem to responded when I test it. I checked my lines of code, which according to the “Developer hub” is correct.
Here are the lines of code I had typed:
I tried to figure out a solution but it seems I couldn’t find one. Thank you for your time.
On line 7 you put part.Parent but part doesn’t exist. You should put partParent.Parent considering the line above. You can see the part is underlined because it’s not correct
Edit : just saw that above you also do .Parent so that won’t work I think. You need to remove the .Parent on line 6 or 7 ( or just remove line 6 and do otherPart.Parent on line 7 )
local boost = 250
script.Parent.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChildWhichIsA("Humanoid")
if hum then
script.Parent.CanCollide = false
if hum.JumpPower < boost then
local pastPower = hum.JumpPower
hum.JumpPower = boost
hum.Jump = true
script.Parent:Destroy()
wait(10)
humanoid.JumpPower = pastPower
end
end
end)
What you did wrong with part.Parent is that part is not referenced, you did onPartTouch(otherPart) and then used part.Parent instead of otherPart.Parent.