local tweenService = game:GetService('TweenService')
local Endposition = '(-46.346, 49.906, -1675.334)'
local pattern = '%((.-), (.-), (.-)%)'
local function convert(s)
local x, y, z = s:match(pattern)
local sus = Vector3.new(
assert(tonumber(x), x),
assert(tonumber(y), y),
assert(assert(tonumber(z), z)
))
return sus
end
local EndPositionVector = convert(Endposition)
local tweenInfo = TweenInfo.new(30, Enum.EasingStyle.Cubic, Enum.EasingDirection.In, 0, false)
local Tweentest = tweenService:Create(script.Parent, tweenInfo, {Position = EndPositionVector} )
Tweentest:Play()
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
If you want to move the entire model (I believe that’s what you’re trying to achieve), then you can simply tween the PrimaryPart of your model. When doing this make sure all parts are properly welded to the PrimaryPart to your liking.
Replace your line to this (I assume the script’s parent is the model?):
local Tweentest = tweenService:Create(script.Parent.PrimaryPart, tweenInfo, {Position = EndPositionVector} )