I have this button that is supposed to resize and reposition a part. But a problem I have a lot is that vector3.new and tweening can't have a part in a position if there is other parts in the way.
Not Anchored - Not wrong position sat - Checked many times
Script:
click = script.Parent.ClickDetector
local Giver = script.Parent.Parent.Parent.Giver
local av = false
function wat(player)
if av == true then
av = false
Giver.Position = Vector3.new(9.774, 0.825, -6.403)
Giver.Size = Vector3.new(1.57, 0.25, 4.11)
Giver.Transparency = 0.2
script.Parent.BrickColor = BrickColor.new('Really red')
script.Parent.Parent.Main.SurfaceGui.Frame.TextLabel.Text = "AUTO COLLECTER OFF"
elseif av == false then
av = true
Giver.Position = Vector3.new(6.18, 0.722, -38.968)
Giver.Size = Vector3.new(191.59, 0.05, 159.38)
Giver.Transparency = 1
script.Parent.BrickColor = BrickColor.new('Lime green')
script.Parent.Parent.Main.SurfaceGui.Frame.TextLabel.Text = "AUTO COLLECTER ON"
end
end
click.MouseClick:connect(wat)

2 comments
I don't know the technicalities as to why Vector3s cannot go through Parts but to do what you want, use CFrames instead.
Thx, I thing I used Cframes at a time because it didn't worked but the script is removed so couldn't remember.