BodyMovers Not Working Client

So basically I needed to move my web swinging from server to client since it was too laggy and just wasn’t needed on the server, anyway basically it worked perfectly on the server but now it seems to have stopped working once I moved it to the client

local BV = Instance.new("BodyAngularVelocity")
BV.P = (humrp.Position - MouseAttachment.WorldPosition).Magnitude * 25
local t = TweenService:Create(BV, TweenInfo.new(2), {MaxTorque = Vector3.new(0, math.huge,0)})
t:Play()
BV.AngularVelocity = MouseAttachment.CFrame.lookVector * 0
BV.Parent = humrp
		
local BV1 = Instance.new("BodyAngularVelocity")
BV1.P = (humrp.Position - MouseAttachment.WorldPosition).Magnitude * 1500
local t = TweenService:Create(BV1, TweenInfo.new(1), {MaxTorque = Vector3.new(0, math.huge,0)})
t:Play()
BV1.AngularVelocity = MouseAttachment.CFrame.lookVector * 5
BV1.Parent = humrp	
		
		
		
		
game:GetService("Debris"):AddItem(BV1, 1.2)
game:GetService("Debris"):AddItem(BV, 1.2)

You are likely dealing with an issue where the part is owned by the server and thus it ignores any client constraints. You need to set the part you want affected by the velocities to the client who created them.

This must be on the server:

local part = --whatever part
part:SetNetworkOwner(game.Players["Player creating the constraint here"])

If you have code on the client and need this done, you should create a remote event that fires to the server and then use the player object which is passed as the first argument to set the network owner to.

local part = -- part here
RemoteEvent.OnServerEvent:Connect(function(plr))
part:SetNetworkOwner(plr)

To set the part back to the server, do :SetNetworkOwner(nil). Since the game handles network ownership by default, you should probably do part:SetNetworkOwnershipAuto()

For more info on the gibberish I shoved at you (sorry!!), this is a good article: Network Ownership | Documentation - Roblox Creator Hub

3 Likes

Alright sorry for late reply Ill give this a try but, I’m not sure what to give network ownership too

The only other way would be to make whatever u have on the client and then add phyiscs. Or what I do is clone the object in a local script and then set the bodymovers to the local clone and it should work.

Yeah but I need a part to do that from

Also it worked great on the server, and now on here it’s not working right, what am I supposed to set network ownership too?

Check edited reply above for other ideas but it worked on the server since u originally added the movers on the server which had ownership. You either need to clone the object(s) in a local script and apply the bodymovers or get whatever the bodymovers are interacting with and set the networkownership to the player who creates the bodymovers.

Yeah but I parent the bodymovers to the humanoid root part, when I had it on the server, the reason Im switching to the client is because when I went into an actual game it messed up and was delayed