How do I make a part move for everyone on the server when picked up locally?

So I made a script that picks up a part. all it does is weld it to a little part I made with instance.new directly in front of the gun, and updates the position locally.

Keep in mind both the weldconstraint and positioning of the part are done locally (stupid i know), and it isn’t a service owner problem.

However on the server it doesn’t register that I am moving the unanchored part at all. How would I make the server update its position smoothly?

Heres an example of what i mean:

This is the line of code that positions it:

humpart.CFrame =  cam.CFrame * CFrame.new(.02,-1.5,-.7) * walkingcframe * CFrame.new(-num.X/400,num.Y/400,0) 

Huh I dont understand anything literally but you can try to make the server weld it instead of the local player. Also that %1 of the script cant help me

bro what you showing is server its not for other players

you could try maybe passing the part cframe through a remote event and then moving it on the server (just make a check for the distance from player to part so that exploits cant move stuff far away)

First of all, you cant.

Unless you spam remote event which i wouldnt recommend, you really cant do it.

Unless you fire to all clients using bindable event that updates the part position which i dont know if it works, you can change your script to a server and set the network owner to the player

You can’t, the reason we have client and server is to differentiate controls and authority - you need to have remote events passed via the client to the server to update the parts position/cframe.

I replaced the positioning with AlignPosition instead and it works great.

Maybe welding would also work also spamming remotes with 0 ms is bad but if u do something like 0.1 it wont be really noticable and Remote Events are well optimized

well yeah remote events should always have a delay sorry for not mentioning it

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