I have seen people using CFrames to move an object to another objects position but actually having it move and not just teleport. I was wondering how this works. You can see it is used here.
Use TweenService
! Tweening is used for interpolating almost any numeric property of certain objects. In your case, I'm assuming, a part.
So here's how it goes;
local TweenService = game:GetService("TweenService") --gets tween service local part = workspace.Part --gets the part (change it to your own part's address) local tweenInfo = TweenInfo.new( --how we want our tween to play 1, --how fast the tween is (in seconds) Enum.EasingStyle.Linear, --easing style Enum.EasingDirection.Out, --easing direction 0, --no. of times the tween will repeat false, --will the tween reverse upon finishing? 0 --how long the delay is (in seconds) ) local goal = { --goal for our part's property, in this case, the position Position = Vector3.new(69,42,0) --our goal position for our part } local tween = TweenService:Create(part, tweenInfo, goal) --now creates the tween tween:Play() --finally, plays it
Here are some resources; I hope this helps! https://developer.roblox.com/en-us/api-reference/class/TweenService https://developer.roblox.com/en-us/api-reference/datatype/TweenInfo https://developer.roblox.com/en-us/api-reference/enum/EasingStyle
You can use https://developer.roblox.com/en-us/api-reference/class/TweenService or https://devforum.roblox.com/t/cframe-lerping-with-for-loop/1104800