Strange Physics using VectorForce

Problem:
When the bike is being run on a server with players, the bike physics acts up when a player approaches. I’m not sure if this is a bug with the current studio engine.

Physics when on the “Run” test as shown here:

Physics when on the “Play” test as shown here:

VectorForce Calculation:

local t = primary.Orientation.Z
local f = -balancePID:Calculate(dt, 0, t)
vf.Force = Vector3.new(0, 0, f)

Explanation:
Applies the force opposite of the bike’s PrimaryPart’s Z orientation using sleitnick’s PID to smoothen the force.

1 Like

Not 100% sure if this is the issue or not, but have you tried giving the network ownership of the unanchored part(s) to the server? Have you tried testing it out in an actual game as well?

Yes, the issue still happens when testing the actual game server, and I’ve tried setting the network ownership to the server.

Just realized that I had to set the network ownership inside of the loop where the force was being applied, trying to find a more efficient way of doing this though.