"RocketPropulsion" doesn't work

I am trying to create an part to target me with RocketPropulsion, I wasted 2 hours trying to get it work, and it doesnt work. My Part is gone after I do :Fire() to RocketPropulsion. This is my localscript:

wait(2)

workspace.ProjectTile.RocketPropulsion.Target = game.Players.LocalPlayer.Character.HumanoidRootPart
workspace.ProjectTile.RocketPropulsion:Fire()

Captwefwefwefure

Cawefewfewfwefepture

I tried also to set Trust and MaxTorque to math.huge but it didnt work out either.

It always makes the part go somewhere under baseplate or just shoot randomly into sky

1 Like

This seems to work as expected on a normal part. Would you mind posting the MeshPart you’re using for the projectile?

It’s just mesh from toolbox for testing project tiles before I actually make my own asset. But here is mesh: bxassetid://4401932459

It’s bad practice to set the properties of just about anything other than the Humanoid when you’re using a LocalScript, so you should be running this from a script instead.Maybe you should try increasing the ThrustD value, as it seems like your projectile may be overshooting and deleting itself by going too far.

After messing around with it for a while, I think it might be an issue in which the projectile falls asleep and stops short of its target. Since the projectile exists on the server, any physical interactions on the client should replicate, which leads me to believe that this is some sort of simulation error. Constraints have essentially superseded body movers, so I don’t foresee this behavior changing anytime soon.

That being said, I was able to achieve the intended results on both the client and server by giving them complete control over the process. Assuming that you want the projectile to be visible on all clients, you would have to tell the server to create the projectile and set the target accordingly.

On a side note, I believe the flinging you were experiencing can be stabilized by increasing the density of the projectile or reducing the thrust.

1 Like

Could you show me how you were able to get the projectile to stop short of its target and fall asleep? This might occur if the RocketPropulsion has the projectile moving at very low velocities, is that what happened?

If the projectile part is flying off into space, the issue is very likely due to it being too light for the RocketPropulsion’s parameters. I can’t see what the size or density of your projectile is, but increasing either one of those should solve the problem (Size: 1x1x1 and Density: 1 should work fine).

2 Likes

Project Tile:
Size: 0.322, 0.326, 1.676
Velocity: 0, 0, 0
RotVelocity: 0, 0, 0
Orientation: 0, 0, 0
Anchored: false
CanCollide = true
MeshId: rbxassetid://4401932459
ClassName: MeshPart
Parent: Workspace
Placed on top of default Baseplate

Rocket RocketPropulsion
Default Properties

LocalScript

wait(2)

workspace.ProjectTile.RocketPropulsion.Target = game.Players.LocalPlayer.Character.HumanoidRootPart
workspace.ProjectTile.RocketPropulsion:Fire()

Upon further inspection, it looks like the projectile prioritizes the TargetOffset over the position of the Target object. After reaching the TargetOffset, the projectile falls asleep until it comes within a player’s SimulationRadius. Correct me if I’m misconstruing the documentation, but it is my understanding that the TargetOffset only takes the place of the target position when the Target is nil.

Place File: RocketPropulsion.rbxl (34.0 KB)


Here is an example in which the SpawnLocation is the assigned Target, and the TargetOffset is defined at the origin.

I think what’s actually happening is that the RocketPropulsion has no Target due to the property being set on the Client, so it just goes to the world origin + TargetOffset. It does correctly stop when reaching its goal. Once it enters your streaming radius, its able to actually set its Target as defined in the LocalScript, and move there. So no sleep issues here!

As @liuthemoo mentioned, the best practice here is to set the property on the server, not the client, as it won’t necessarily replicate to the server.

1 Like