Usually when you have a buoyancysensor set on a object, regardless of its state, it should be detecting if it is fully submerged in the water or touching the surface. But, when a client ownership is set onto the object, the Buoyancy Sensor does not function.
In the video, Grey means the BuoyancySensor did not detect itself touching water, blue means its touching the surface (bool TouchingSurface), and red means its submerged fully (bool FullySubmerged)
I used workspace.Ball:SetNetworkOwner(game.Players.Player) to set the network ownership, but this happens anytime a player claims ownership of a part
My system information is a Intel(R) Core™ i5-14400F@ 2.50 GHz, 16 GB, NVIDIA GeForce RTX 4060
It looks like, if I move it on the Server the color changes.
But not on the Client.
But if I change the Script
to RunContext, Client, it does work for the Client, but then it won’t work for the Server anymore
What’s a bit interesting is that you can set it to RunContext Client for the Client only, while for the Server it stays on Legacy. But I am not sure if this would work on a published game…
It is also having trouble to reset FullySubmerged once it reaches the top of the water again.
Buoyancy sensor data is not always replicated between client and server. I think the fix will depend on the use case: If things like the color change only need to be done locally for the client, then you can just change the RunContext of the script to Client. If data needs to be replicated, then you will likely need to set up some remoteEvents to transfer data between client and server. Hope this is helpful!