So, I want to create multiple objects floating on the ground but I'm not sure that using a loop would be the best way. For the rotation, I know that I could use the BodyAngularXYZ Object. This avoids code but what about the floating? Is there a body object that could create the physics of a floating object or if it must be scripted what is the best way or is the best way to infinite loop it?
When answering this question please explain why the method you claim to be best is the best in terms of efficiency and quality.
Currently I have:
while true do
wait()
for i = 0, 1, 0.01 do
wait()
script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,i,0)
end
wait()
for i = 1, 0, -0.01 do
wait()
script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,i,0)
end
end
Thanks for any feedback!
