I am going to just use a simple example to convey my problem.
lets say i have 3 parts in this small senario. and i want to have lets say it to turn a color based off of its name. and i only want to controll this from one script. doing soo i would have this ugly out come of
now lets say i have 30 of these also changing at the same time i cannot manually type these all out so how can i go about this? in my case i have multiple frames in a grid layout and i want it that every time one of those frames are clicked the assigned frame gives you its tool then deletes, but there a lot of frames
I tried this technique but I dont know what you have done is the wrong part for my situation or im just dumb
local function InputCheck(Chest)
local UIClone = Chest.UI:WaitForChild("ChestGui")
for _, Frame in pairs(UIClone.Main:GetChildren()) do
if Frame.Name == "UIGridLayout" then continue end
print(Frame) -- only prints this nothing else
Frame.InputBegan:Connect(function(Input)
print("woah") -- no print
if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
if Frame.Name == "Delete" then
Event:FireServer("Delete")
print("youch")-- no print
else
print("Yipee")-- no print
Event:FireServer(Frame.Text.Text)
end
end
end)
end
end