:ApplyImpulse doesn't work on the server (for player characters)?


it did work for me, here’s the video.

The snippet you provided had :SetNetworkOwnershipAuto()

in your video, it was :SetNetworkOwner(nil) I changed that and somehow worked:

My bad I edited and forgot to provide the new change.

Np

This still doesn’t make sense to me, the player already owns their character, like, how and why does that work??? I’m extremely confused by both the docs and the behavior of this method.

actually, im confused too, they already own it, but when you manually set it, it works.

Roblox being Roblox :man_shrugging:

I gtg, thanks for your time! I’ll be back some hours from now., hope someone comes up with an explanation :sweat_smile:

1 Like

no problem, I will try to find an explanation too

1 Like

Just got back and realized that :ApplyImpulse isn’t instantaneous (has some throttling), so the line rootPart:SetNetworkOwner(player) has nothing to do with it, the code:

local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

remoteEvent.OnServerEvent:Connect(function(player)
	print("received signal, applying impulse...")

	local rootPart = player.Character.PrimaryPart
	rootPart:SetNetworkOwner(player)
	rootPart:ApplyImpulse(Vector3.new(0, 10000000000 --[[one gazzilion]], 0))
	rootPart:SetNetworkOwner(nil)
end)

just works because it’s setting the network owner to the server at the end. The best way to confirm this is to remove that line, the impulse works just as intended:

So It’s basically the initial solution everyone thinks of, setting the network owner to the server.

Which brings me back to the initial question:

I guess I’ll just leave that in the air because I have no idea :sweat_smile:

Here’s the updated repro file if anyone wants to experiment with it

applyImpuseFromServer.rbxl (54.2 KB)

Just to clarify it for you, automatic ownership happens when the client is either close to an unanchored part or not

when the client is close, the network ownership of the part changes to the client.

when the client moves away, the network ownership of the part reverts back to the server.

ApplyImpulse() is not meant to be used for ‘characters’ but Baseparts, your character just happens to have baseparts. The ownership over the character is always on the client, that is why ApplyImpulse() might not work in the server for baseparts under the character model.

Here is key information to fully comprehend what is going on in the repro file.

1 Like

Then I shouldn’t even be using ApplyImpulse on characters?

So player character ownership isn’t considered automatic because the client always owns it?

The repro file is working, it just sets the network owner of the character to the server, essentially the initial suggestion I received on this topic. What does this have to do with the task scheduler? I didn’t quite understand what you mean.

what i mean is that it’s made to be used on baseparts, if your character has baseparts it can be used on those baseparts too

yes

i shared the wrong link, sorry. I assume you already read it.

Oh, that makes sense. Yes, I already read it, I just thought that the character ownership was automatic because its parts were unanchored.

Thank you for the insight! And thanks to everyone who answered to this topic!

1 Like

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