I am trying to get a part to teleport to a certain spot and change size if it selected by random on a table. The part changes size like it should but it is way above where it should be. I have no idea why this is happening. Here's my script
local zoneq1 = game.Workspace.ZoneQ1
local zoneq2 = game.Workspace.ZoneQ2
local zoneq3 = game.Workspace.ZoneQ3
local zoneq4 = game.Workspace.ZoneQ4
local zoneSelect = math.random(1, 4)
if zoneSelect == 1 then
zoneq1.Size = Vector3.new(1024, 246, 1024)
zoneq1.Position = Vector3.new(509.5, 82.481, 511.5)
end
if zoneSelect == 2 then
zoneq2.Size = Vector3.new(1024, 246, 1024)
zoneq2.Position = Vector3.new(-514.5, 82.481, 511.5)
end
if zoneSelect == 3 then
zoneq3.Size = Vector3.new(1024, 246, 1024)
zoneq3.Position = Vector3.new(-514.5, 82.481, -512.5)
end
if zoneSelect == 4 then
zoneq4.Size = Vector3.new(1024, 246, 1024)
zoneq4.Position = Vector3.new(509.5, 82.481, -512.5)
end
im not getting any errors or anything but the position of zoneq4 is 509.5, 305, -512.5 which is just higher. It might be that there is other parts and terrain where it would be if the position is correct but still I don't understand why it isn't going to the position I told it to. Thank you :)

3 comments
Have you tried using CFrame instead?
use CFrame. Vector 3 cant teleport out of walls.
Oh thanks. Better late than never lol