or using :SetNetworkOwnership(nil)
to the part you want apply impulse to
Oh, that makes sense.
Isn’t it supposed to work on the server regardless of network ownership (according to the doc I linked)?
I’m just testing something I don’t want to use remote events for something that I’ll probably erase (so thanks for the network ownership suggestion, I’ll try it out)
The server owns the Anchored parts, but for the unanchored parts the engine automatically sets ownership of that part to the client. the parts that is close to a player’s character are owned by a player.
Exactly.
“this function” being :ApplyImpulse
, why wouldn’t it work when calling from the server on a client-owned part (character body part or any other)?
then there might a problem with how you use :ApplyImpulse.
Please read the topics of these answers:
There are a lot of topics about this, nobody can get it working on the server for client-owned parts, even if the ownership was automatically set.
Here’s a repro file I just made in case you want to test it, it’s not just on the forum:
applyImpuseOnServer.rbxl (54.2 KB)
Maybe I’m doing something wrong idk
Alright, I have tested few stuffs, and it works on unanchored parts but not the player’s character, when i took the server code and pasted it on the client code, it worked on the player.
So, what’s different in the character? Its ownership isn’t considered automatic?
You own your character’s ownership by automatic, and there’s a video in the roblox doc that states that.
So either the doc is wrong or the method is fucked up?
Well, i have found something, if you want to apply something on your character, set the network owner of the part to the player:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
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:SetNetworkOwnershipAuto()
end)
this works
Whaaaaaaat, on the server? Isn’t the player already the owner of his rootPart?
Idk, i tried this and it made the player fling.
Weird, just tested it, isn’t working for me.
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.