`ApplyImpulse` doesnt work on BasePart network owned by a player

When I try to use ApplyImpulse function on a BasePart that is a network owned by a player, It doesn’t work.
In Roblox docs, it said that ApplyImpulse will work BaseParts network-owned by a player on both localscript (Client who owns it) and script (Server). Any solutions to this?

1 Like

Try setting the ownership to the server before performing the impulse then.

BasePart:SetNetworkOwner(nil)
1 Like

But If I do It to a Player’s Character, Roblox internal scripts reset it back to player.

PREVIOUS ANSWER

ApplyImpulse should work you’re right! That’s weird

Just things to double check if you havent:

  • Did you check that your script is running the block of code that contains the ApplyImpulse
  • Is the Vector magnitude too small so it just looks like it’s not moving?

Another thing is, applying force to parts that aren’t the HumanoidRootPart probably is going to give you unexpected (or no) results, I’d be careful with that.

EDIT:

I went into studio to test it out myself, you cannot ApplyImpulse to parts owned by the client from the server.
You’d need to send an event to the client to do it itself, unfortunetly

If the part is owned by the server, this function must be called on a server Script. If the part is owned by a client, this function can be called on a LocalScript or server Script.

I’m not sure why the docs would say this, I tested it with non-character parts owned by the client and still nothing.

2 Likes

What’s happening? Nothing? Video? Code?

1 Like

If the part is owned by the player, then the player’s client has to be the one to ApplyImpulse on it.

Think about it. Only the one running the physics simulation can actually control the physics simulation. If it’s owned by the server, then server scripts can call ApplyImpulse. If it’s owned by a player then the player needs a LocalScript to call ApplyImpulse.

If you’re applying impulses to the character from the correct client and it’s still not moving: your impulses aren’t powerful enough. Humanoids are very strong.

2 Likes

The way it’s written in the documentation it makes it sound like the server will request the client to do the physics updates, I don’t blame the OP for thinking that it is possible.

2 Likes

Server scripts are allowed to call ApplyImpulse on parts owned by a client, it just won’t do anything. Maybe calling ApplyImpulse from the client on parts that the client doesn’t own throws an error.

2 Likes

It also just does nothing, which is what I would expect since they should have no authority over it.

I think this a documentation issue ):

2 Likes

I have already tried it but, Docs are bit misleading.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.