Question: how does the density of an object affect its ability to float?
Answer: Density is the only thing affecting whether something floats or sinks. If an object has a higher density than the fluid it is in (fluid can mean liquid or gas), it will sink. If it has a lower density, it will float.