I would like make that my Model moves with TweenService, but is it possible?
local TweenService = game:GetService('TweenService')
I would like make that my Model moves with TweenService, but is it possible?
local TweenService = game:GetService('TweenService')
You would need to do something along these lines, however keep in mind that using SetPrimaryPartCFrame will cause floating point precision errors over time.
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new()
local function tweenModel(model, CF)
local CFrameValue = Instance.new("CFrameValue")
CFrameValue.Value = model:GetPrimaryPartCFrame()
CFrameValue:GetPropertyChangedSignal("Value"):Connect(function()
model:SetPrimaryPartCFrame(CFrameValue.Value)
end)
local tween = tweenService:Create(CFrameValue, info, {Value = CF})
tween:Play()
tween.Completed:Connect(function()
CFrameValue:Destroy()
end)
end
Do you guys have a way more proper to use the TweenService function to move a model around? if not thanks for your answer!:))
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
test it
@incapaz, If you got nothing smart to say then say nothing, otherwise if i asked the question, it's because i've already tried it. Thanks dude:)