I’m now getting this.
Oh, then you cant tween models. You probably have to tween the PrimaryPart, make sure you have WeldConstraints though.
That’s what I’m doing, I have everything welded, and the original script tweens the primary part. But It rotates the primary part, when it shouldn’t be.
A Model
does not have a CFrame
property, you should do Model.PrimaryPart
for the object it’s gonna tween.
I’ve fixed it!!
Here’s the edit’s I did to your script.
local TweenService = game:GetService("TweenService")
local Model = script.Parent.MainPart
local tweenInfo = TweenInfo.new(
5,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false
)
local goal = {CFrame = CFrame.new(53.996, 40.478, -33.288) * Model--[[.PrimaryPart--]].CFrame.Rotation}
-- Multiply it by the CFrame.Rotation so that both start and goal CFrames will have the same CFrame.Rotation
TweenService:Create(Model, tweenInfo, goal):Play()
script.Disabled = true
1 Like
Thank you so much for your help, I really really appreciate it, and the response time was fantastic aswell.
1 Like
If this works, please mark this reply as the solution, so that other DevForum users know.
Simply use position instead of CFrame
local TweenService = game:GetService("TweenService")
local Model = script.Parent.MainPart
local tweenInfo = TweenInfo.new(
5,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false
)
TweenService:Create(Model, tweenInfo, {Position= Vector3.new(53.996, 40.478, -33.288)}):Play()
script.Disabled = true
1 Like