while true do
local Child=script.Parent.Game.LeftLane:GetChildren()
if Child.YScale< Child then
Child.Name="Left1"
end
end
19:44:25.117 - Players.Player.PlayerGui.LocalPricklyMagpie:66: attempt to compare nil with table
Hierarchy: game>Players>PlayerGui>Game(ScreenGui)>LeftLane
--Will this work [edit]
children = script.Parent.Game.LeftLane:GetChildren()
for k, child in pairs(children)do
if child:IsA('ImageLabel') and
child.Name=="Left" and
child.YScale<=children then
child.Name="Test"
end
end
I'm trying to make a script that constantly checks if a Frame's YScale is lower than other the other Frames with the same exact name inside "LeftLane" . After the code finds that one, it will rename it so it can function with my DDR script.

5 comments
I'm a bit confused. You're trying to get the children of Child, check their Y scale and compare it?
I'm trying to get the Children of LeftLane. They all have the same name. After getting the children I want to compare all of their YScale values and the one that has the lowest one will receive a name change.
YScale isn't a property of the table Child. :GetChildren() method is a table.
The code required to achieve what you're trying to do is MUCH longer than what you are already doing.
can you explain the components needed so I can google them on the roblox wiki?