So, I want to make a Part that will be able to "fly". What I mean is that it will slowly move to a position and then to another and another later when it comes back the loop will start again. Give me clues of what to use.
Start of by moving and experimenting where the block could go eg:
-- script.Parent = Part (The thing you want moving) Part = script.Parent for i = 1,100 do Part.CFrame = Part.CFrame +Vector3.new(0, 0, 0) wait(0.05) end --Experiment by putting numbers where "0, 0, 0" is
If you want to rotate it do this:
Part = script.Parent for i = 1,100 do Part.CFrame = Part.CFrame *CFrame.Angles(0, 0, 0) wait(0.05) end
Use different BodyMover
Instances to achieve smooth motion, for example BodyPosition
, BodyVelocity
, BodyGyro
, and BodyThrust
.
You can read about them in more detail on the Official Roblox Wiki:
http://wiki.roblox.com/index.php?title=BodyMover_Objects