Help on an object movement system

You can write your topic however you want, but you need to answer these questions:
I would Like to create a pickup and place system similar to that of in this video:

I am not too sure where I would start, obviously I would need the objects but what would be the most efficient way for me to go about creating this, would it be the client always detecting a keypress for instance ‘E’ then when it is pressed it fires an event and the server then moves the object to an attachment that is placed infront of the player? I’m just curious to weather that would be the most efficient way as a while true do() and detecting the keypress could create lag especially as I would need to do it for other things such as the machinery that we are creating.

again: I’m just curious to weather that would be the most efficient way before I start scripting

The most efficient and non-intensive way to do this (in my opinion) would be to use bodymovers.

On the client, You will detect when the key is pressed, then pass it to the server via a remotefunction.
Check if anyone’s already grabbing it, you can do this with value objects or a cache on the server.

From there, you will make a new bodyposition in the primarypart of the model
(NOTE: All parts within the model should be un-anchored and welded to eachother)

You will also set network ownership to the client on the server, From there you can update the bodymover’s position in a loop or at every .RenderStepped event.

The new position for the bodyposition would be something like this:

bodyposition.Position = HumanoidRootPart.Position + HumanoidRootPart.CFrame.LookVector * 25

To rotate the object, you will want to use a bodygyro aswell.

1 Like

That makes a surprising amount of sense thanks!

1 Like