TweenService problem with UDim2 and Vector3

Hi, I want the image to follow the head of the player but I have this problem :

23:35:06.376 - TweenService:Create property named ‘Position’ cannot be tweened due to type mismatch (property is a ‘UDim2’, but given type is ‘Vector3’)

		local TweenService = game:GetService("TweenService")
		local TweenInfoo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
		local Properties = {
			Position = c:FindFirstChild("Head").Position
		}

		local tween = TweenService:Create(Pic,TweenInfoo,Properties)
		
		wait(5)
		tween:Play()
	end)
	end)

no its not hes just trying to tween property that takes udim2 with vector3

2 Likes

Oh, so how do I do that?? :thinking:

something like this, idk if this would work but its just to give u idea what u were doing wrong
UDim2.new(0, c:FindFirstChild("Head").Position.X, 0, c:FindFirstChild("Head").Position.Y)

1 Like

The actual property type is UDim2, but u gave it a Vector3

		local TweenService = game:GetService("TweenService")
		local TweenInfoo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
		local Properties = {
			Position = c:FindFirstChild("Head").Position
		}

		local tween = TweenService:Create(Pic,TweenInfoo,{Position = Udim2.fromOffset(Properties.Position) or new or fromScale})
		
		wait(5)
		tween:Play()
	end)
	end)