I have this script here and I wanna know why the part flies away! Ive tried replacing with waitforchild() but that didnt work. Im trying to make a random meter that varies in value.
--Services
local TS = game:GetService("TweenService")
local RS = game:GetService("RunService")
local HS = game:GetService("HttpService")
--Definers
local part = script.Parent.SpawnTherm:WaitForChild("Moving")
while wait(4) do
--Defining Tables and Table Editing
local mathRandom = math.random(2.5, 4)
local goal = Vector3.new(0.7, mathRandom, 0.05)
local tweenInfo = TweenInfo.new(
4,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
0,
false,
0
)
while wait(1) do
part.Position = Vector3.new(part.Position.X, part.Position.Y, part.Position.X)
wait(0.05)
end
local Tween = TS:Create(part, tweenInfo, {Size = goal})
Tween:Play()
end

8 comments
So are you trying to make the part move? Because you dont have to do that with tweening.
@MarcTheRbuxQb im trying to make an offset so it doesnt go inside of the block above it
is can collide on?
no, can collide is off. its also anorched.
well if can collide is off then it goes through things
turned it on and its still causing problems, please help!
is the part above can collide off?
both gotta be can collide on