Need Help With Vector3

I’m trying to make it so the tween will go directly into the Pos. set, but It doesn’t work. (I’ve tested it with some other stuff that doesn’t set the direct pos like + Vector3.new) Can anyone please help me?

local model1 = script.Parent
local model1pos = Vector3.new(-141.547, 57.303, -841.974)
--first part
local tweens1 = game:GetService("TweenService")
local info1 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
local pos1 = model1.Position == model1pos
local tween1 = tweens1:Create(model1, info1, {Position = pos1})

--second part
while true do
	tween1:Play()
	wait(0.5)
	wait(3)
end

(Note, I’m just trying to test it so just ignore the wait(3).)

this will return a Boolean, not a Vector3. If you want to set a specific position if they match, you can do this:

local pos1 = model1.Position == model1pos and yournewposition or fallback
2 Likes

I’m a bit confused here, what does fallback mean?

1 Like

fallback would refer to whatever position you want it to take if model1.Position == model1pos returns false.

I think what you actually want in your script is to replace local pos1 = model1.Position == model1pos with simply local pos1 = model1pos, based on your post’s text

2 Likes