I asked a question about CFrame movement and was kindly provided with this script:
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
However, me not being very strong with Lua, I can't figure out how to add orientation to this. Does anyone know if it's possible and/or provide a script?
Under the goal property put the orientation there.
It reads.
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 Orientation = Vector3.new(1,-1,0) -- our goal orientation for our part }
Hope this helps.