I made a similar thread yesterday - however due to lack of result and some terrible explaining(on my part); there was no sollution.
My underlying issue is
A platform being moved with BodyPosition and BodyGyros will not allow players to stick entirely to it. They will stay on top but slowly drift from their original position.
A quick breakdown of the game and current implementation
The game is based around a similar idea to Skeds VR Playgrounds - in which there are big users with VR sets who can interact with small users. In my implementation I do as follows:
On VRService.UserCFrameChanged I move two parts locally to show as ‘hands’
Right afterwards I fire the server with the location of these ‘hands’
The server then updates a Body Position & Gyro to the location it is given
The ‘sever hands’ are now synced with the client hands. With a slight delay.
Technical Details
The server hand is NetworkOwnership(nil)
The solid hands are entirely client-sided and have no impact on physics. They are just for tracking the controllers
People told me it was impossible to get this to work perfectly, but that simply isn’t true. Because with the following code: (script.Parent is a BodyPosition)
script.Parent.Parent:SetNetworkOwner(nil)
local a = script.Parent.Parent.Parent.a
local b = script.Parent.Parent.Parent.b
while wait(5) do
script.Parent.Position = b.Position
wait(5)
script.Parent.Position = a.Position
end
What I don’t understand is why the lower result works but the top one doesn’t - they both do the exact same thing; which is updating the position of a body position.
Here is my code from the (top) image.
CLIENT:
RUN.RenderStepped:Connect(function()
local data = {rightHand.CFrame,leftHand.CFrame,head.CFrame}
REP.remotes.data_update:FireServer(data)
...
Maybe consider a lower refresh rate for updating the location of where the VR hand is? Might be more delayed than prefered but it’ll ensure the player will stay on the hand more accurately as the many updates to Body Position might add the tiny micro amount of ‘float point errors’ to have a player slide off.
Maybe consider updating the position of the hand if the hand has moved more than a stud?
Maybe let the Roblox Server handle who owns the Network Ownership so whoever is standing on the hand will stay with it?
Perhaps manually CFraming the dummy onto the platform will work. I use this system with a train in my game. The train is moved on the server-side and then a local script moves the client to keep it in the same relative position.
I did this and this worked perfectly. I would like to really credit you on your sollution.
And yes I know everybody is face-palming of why this wasn’t tried earlier and the main reason was because:
It broke any physical interactions - due to replication.
Thus my final sollution was:
Have the server hand :SetNetworkOwnership()'d to the VR Player, and then have a secondary invisible hand that cannot collide with players or the first hand; which is NetworkOwnership()'d to the server. One deals with player platforming and the other physics.