How to make a perpetual motion machine script?

Good idea. Give me more details for scripts?

You could probably either use a invisible conveyor or have a script parent force to the ball when touching a non-collide part and remove it halfway through to have it slow down.

Yes, I don’t know how to do a script to speed up the ball. How can I do this? Which documents i need read?

in the hole put an invisible block down. and when the ball touches it multiply the velocity so it will jump back to the start

Yes, I know, I’m asking how to write this script. Which documents i need?

whenever a part is touched it can be called by part.Touched:Connect(function)
so we can apply this by

local part=game.Workspace[PartName]
part.Touched:Connect(function(PartTouched)
	PartTouched.LinearVelocity*=5
end)

Thanks but not anything changed. Script not work.

i forgot, but I think you may also need a LinearVelocity object in your ball; also it should probably be destroyed so it doesn’t multiply exponentially.

How to add LinearVelocity object?

Insert Object > LinearVelocity > Parent to part
otherwise
plus sign next to part > Linear Velocity

What is wrong? Not working.

ServerScriptService:

local part=game.Workspace.ball2

part.Touched:Connect(function(PartTouched)
	PartTouched.LinearVelocity*=5
end)

image
image

Im pretty sure its not supposed to be the ball. It should be an invisible block for the hole in the funnel. So in which the ball touches it. It will multiply the speed.
The problem with this script
part.Touched:Connect(func(PartTouched)...end)

Mainly PartTouched is gonna have its velocity multiplied and not the ball, because PartTouched is whatever touches part, and you set part to the ball. So part is not supposed to be the ball. The invisible block is

ball=game.Workspace[BallName]
invisblock=game.Workspace[InvisibleBlockName]
invisblock.Touched:Connect(function(PartTouched)
    if PartTouched==ball then
        PartTouched*=5
    end
end)

also LinearVelocity is an attribute of an part so you dont have to add a BodyMover or whatever.

Again not working. The ball is not accelerating.

my bad not only did I forget to put LinearVelocity its suppised to be AssemblyLinearVelocity
so replacr this withPartTouched.AssemblyLinearVelocity*=5

1 Like

Problem have script.
image

you put WithPartTouched and not PartTouched.

Please send full code? I not understand.

Edit: Understand now thanks worked.

i’ve been trying with different combinations for 3 days lol I finally succeeded, but there’s a problem 2. the loop does not work, you will better understand what I mean in the video:

If you want acceleration, then you need to use a VectorForce. LinearVelocity will only apply a velocity/momentum onto the ball.

You don’t necessarily have to use a VectorForce but just clarifying that if you want acceleration, use VectorForce and if you want velocity, use LinearVelocity.

Okay, so why isn’t the second loop working?