Floating objects in water

So I’m making a game where you are stranded on a raft in the ocean, Is there any way to make water physics like HL2 or Garry’s Mod? I don’t want to make water friction as its meant for low spec computers. I’m wanting it to be like: you swim up and hold space and you stay afloat but if you don’t you sink, I also cant get rigid bodies to float in water. Anyone know how to do this?

if the water is a sea level,

if obj.worldPosition.z<SeaLevel:
(tab)object.applyForce([0,0,9.8*obj.mass+obj[‘buoyancy’] ])

#each object that lifts needs a property buoyancy

Also, buoyancy should depend on type of object, e.g. metal should have less buoyancy than wood or a balloon

I made a demo ages ago. You might want to have a look:

I guess this is not really what you want.