Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I tween a model? I have this so far.

`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

tweenModel(script.Parent, game.Workspace.To.CFrame)`

It brings it to the location but doesn't tween to it.

1 answer

✓ Accepted answer

Have you tried filling a time out to your TweenInfo?

4 comments

2

im confused as to why this isnt a comment xd

0

IKR Wow you joined Roblox a while ago, 7 years ago in 2013

0

I tried everything. I’m semi-new to scripting, so I was wondering if anyone can help me like with an example that can work in this situation that I want for it to happen.

0

WOW YOU joined Roblox a while ago, 4 years ago in 2016

This discussion is preserved as it was. New answers, comments, and votes are closed.