I have a model layed out like this.

PowerUps

Script

And 25 JumpPowerUp models here

Here is what is inside the script.

for i, v in pairs(script.Parent:GetChildren()) do
	wait()
	if v.ClassName == "Script" then return end
	v:FindFirstChildOfClass("UnionOperation").Touched:Connect(function(Hit)
		print("h")
		local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
		if Humanoid then
			Humanoid.JumpPower = 200
			v.Parent = game.ServerStorage
			wait(8)
			Humanoid.JumpPower = 50
			game.ServerStorage.JumpPowerUp.Parent = workspace.PvpTerrain.PowerUps
		end
	end)
end

Now whenever I make a new JumpPowerUp it just does not work. Is there a reason for this?

1 comment

1

Most likely because the script is confused that there are two models named JumpPowerUp and can’t target correctly, Breaking the script. Try renaming the duplicate to a different name and changing the script to fit the name as well.