Clientside force works in localservers but not online

In this game, when the player touches water (scripted glass), they will create a clientside buoyancy force so the character floats.
This buoyancy force appears on FilteringEnabled localservers with 200ms of incoming replication lag, the closest I could get in-studio to a real server.
However, this buoyancy force does not appear in-game.

Anyone know what’s wrong?

EDIT: It turned out to be a bug with cosmetics.

It appears in-game for me

also can I just say that I don’t know what you’re doing with all this but those colored liquids turning the character that color is really cute, and I like the underwater effect

I’m interested though, why do the bouyancy client side? Doing client side physics seems to be begging for inconsistencies, though I may be wrong

1 Like

Character physics are 100% clientside, thus any physics should be handled by the server.
Also, it turns out that only R15 characters are affected by this issue.

I had considered the possibility that the reason it was working in localserver but not online was because localserver forced R6 and online I was using R15, but I dismissed it because it would be an engine bug/inconsistency which was unlikely.

Unfortunately, I can’t do a localserver test with R15 characters to diagnose the bug.
It’s important whether or not it works with R15 on a lagless localserver.

With further testing, I’ve confirmed that:
-Drag (BodyVelocity) works
-Buoyancy (BodyForce) doesn’t, but exists

I really, really wish I could test this in a localserver, it’d make things so much easier.

If you ever need a second tester for online I’m usual available

If I were you, I would try to create a buoyancy force using the newer Roblox constraints. Things like VectorForce might work better in terms of replication and lag.

I don’t want to use a workaround that will make my script less efficient.
Testing confirmed that it should work, it’s just this particular case that doesn’t work.

I too have noticed some inconsistencies when playing with the physics of characters, such as in some circumstances trying to affect the Velocity property of the root part. I had to workaround that by adding a BodyMover for a fraction of a second and removing it.

I figured it was due to the HumanoidStateType, however, I tried switching it to Ragdoll and a few others before applying my velocity with no visible effect.

I had to replace this

local forceDirection = (v.Character.PrimaryPart.Position-player.Character.PrimaryPart.Position).unit
v.Character.Humanoid.Sit = true
v.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
v.Character.HumanoidRootPart.Velocity = forceDirection*toolData.bulletForce

With this:

local forceDirection = (v.Character.PrimaryPart.Position-player.Character.PrimaryPart.Position).unit
v.Character.Humanoid.Sit = true
ocal bodyForce = Instance.new("BodyForce")
bodyForce.Force = (forceDirection+Vector3.new(0,.5,0))*(toolData.bulletForce*10)
bodyForce.Parent = v.Character.HumanoidRootPart
wait(.05)
bodyForce.Force = (forceDirection+Vector3.new(0,.5,0))*toolData.bulletForce
game:GetService("Debris"):AddItem(bodyForce,1)

Perhaps I don’t know something I should about the way Characters receive affections to their parts’ velocities, but either way this was an unexpected lack of behavior.

Regardless, I would at least give the new constraints a shot.