I want to grow every part named "GasPart". But it grows every part with this name to the same size. These parts are all different sizes, so could they all grow the same amount on the y axis?
for k,n in pairs(game.Workspace:GetChildren()) do
if n.Name == "GasPart" then
SizeOfX = n.Size.x
end
end
local TweenService = game:GetService("TweenService")
local GasPart = game.Workspace.GasPart
local y = 17.051
local z = 11.5
local x = SizeOfX
local Info = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
-1,
true,
0
)
local Goals = {
Size = Vector3.new(x, y, z);
}
for k,n in pairs(game.Workspace:GetChildren()) do
if n.Name == "GasPart" then
local exampletween = TweenService:Create(n, Info, Goals)
exampletween:Play()
end
end

1 comment
Thank you