TweenService:Create property named 'Position' cannot be tweened due to type mismatch (property is a 'Vector3', but given type is 'CoordinateFrame')

The error is already the title, what I am trying to do is like an elevator the script currently was working on a for loop cframe, but it recently went buggy for unknown reason so I wanted to use tweenservice instead can anyone tell me what does it mean?

Note: I tried using vector3 instead but nothing worked and there wasn’t even any error

local tween = TweenInfo.new(
	4,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	true,
	0
)

local goes = {

	Position = CFrame.new(574.675,116.99,331.876);
}



script.Parent.Parent.Active.Changed:Connect(function()
	if script.Parent.Parent.Active.Value == true then
			game.TweenService:Create(script.Parent, tween, goes)
		--[[for i = 1, script.Parent.Size.x * script.Parent.Parent.Sep.Value do
			script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-51.05 / script.Parent.Parent.Sep.Value, 0, 0)
			wait(script.Parent.Parent.MiniWait.Value)
		end
		wait(script.Parent.Parent.OpenTime.Value)
		for i = 1, script.Parent.Size.x * script.Parent.Parent.Sep.Value do
			script.Parent.CFrame = script.Parent.CFrame * CFrame.new(51.05 / script.Parent.Parent.Sep.Value, 0, 0)
			wait(script.Parent.Parent.MiniWait.Value)
		end]]
	end
	script.Parent.Parent.Active.Value = false
end)

--local Down = {
	--Position = CFrame.new(574.675 , 4.5 , 331.876)
--}
3 Likes

Position can’t be equal to CFrame, it should be Vector3

Unless you want to tween the CFrame, change it to Vector3.new

But I changed it to vector3 it didn’t work, like nothing changed

there wasn’t any error too

Did you spell vector3 with a Capital letter in the beginning?

Yeah I guess I spelled it capital

1 Like

I found where you create the tween

Like this:

game.TweenService:Create(script.Parent, tween, goes)

But you didn’t play it, you need to store it in a variable then play it. Or just add :Play() at the end, but variable is easier since you can also check when it’s completed

Like this:

local tween = game.TweenService:Create(script.Parent, tween, goes)
tween:Play()

--Or this:

game.TweenService:Create(script.Parent, tween, goes):Play()

3 Likes

Ohhhhhhhh yeah I forgot playing it

1 Like