Jump Booster Script Not Working

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:

image

I tried to figure out a solution but it seems I couldn’t find one. Thank you for your time.

2 Likes

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 )

2 Likes

on line 7 local humanoid = part should be otherPart

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)
1 Like

@chicken_boil @Aeventy

TYSM! It really helped. Now I know not to put “part.Parent” on my scripts(Correct me if I’m wrong please)

Putting part.Parent is fine.

It’s useful for touch events.

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.

1 Like