Script wanna have it in exact order

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I made a script that renames the tool depending on if the transparency = 0 of the content I scripted it to.
  2. What is the issue? Include screenshots / videos if possible!
    If you have multiple transparency in a exact order, you gotta make the items transparency 0 in exact that order or it wont rename the tool.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Couldn’t find anything.
local tool = script.Parent.Parent["Raw Beef"]
local cheese = script.Parent.Cheese
local onions = script.Parent.Onions
local lettuce = script.Parent.Lettuce
local pickles = script.Parent.Pickles
local tomato = script.Parent.Tomato
cheese:GetPropertyChangedSignal("Transparency"):Connect(function()
	onions:GetPropertyChangedSignal("Transparency"):Connect(function()
		lettuce:GetPropertyChangedSignal("Transparency"):Connect(function()
			pickles:GetPropertyChangedSignal("Transparency"):Connect(function()
				tomato:GetPropertyChangedSignal("Transparency"):Connect(function()
					if cheese.Transparency == 0 and onions.Transparency == 0 and lettuce.Transparency == 0 and pickles.Transparency == 0 and tomato.Transparency == 0
					then
						tool.Name = "SmashBurger"
					end
				end)
			end)
		end)
	end)
end)

You know you are creating multiple connections and stacking them? As you keep creating more connections on top of each other, it will cause a large use of memory unnecessarily. Split them into separate functions and lines instead.

Ah, but how do I seperate them, since I am still learning.

try this

local tool = script.Parent.Parent["Raw Beef"]
local cheese = script.Parent.Cheese
local onions = script.Parent.Onions
local lettuce = script.Parent.Lettuce
local pickles = script.Parent.Pickles
local tomato = script.Parent.Tomato

local rename = function ()
	if cheese.Transparency == 0 and onions.Transparency == 0 and lettuce.Transparency == 0 and pickles.Transparency == 0 and tomato.Transparency == 0 then
		tool.Name = "SmashBurger"
	end
end

onions:GetPropertyChangedSignal("Transparency"):Connect(rename)
cheese:GetPropertyChangedSignal("Transparency"):Connect(rename)
lettuce:GetPropertyChangedSignal("Transparency"):Connect(rename)
pickles:GetPropertyChangedSignal("Transparency"):Connect(rename)
tomato:GetPropertyChangedSignal("Transparency"):Connect(rename)

Thanks! Fixed my issue. Love this community. <3