You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
When a child gets added to a scrollingframe, it should run the script, but it doesn’t. -
What is the issue? Include screenshots / videos if possible!
No errors, tried debugging and nothing got printed. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, but they didn’t help with my issue.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
player123.PlayerGui["Main-UI"].MainMenu.TeamsTab.Main.Frame.TeamHolder.ChildAdded:Connect(function(child)
print("child added")
if child:IsA("Frame") then
local teamname2 = child.Name
local reqs = require(game.ReplicatedStorage.UIServer:FindFirstChild("TeamPermissions"))
for i,v in pairs(reqs) do
if v.TeamName == teamname2 then
if v.AllAllowed == false then
print("no")
local lock = player123.PlayerGui["Main-UI"].MainMenu.TeamsTab.Main.LockedTeam:Clone()
lock.Parent = child
lock.Visible = true
elseif player123:GetRankInGroup(11169105) >= v.RankRequirement then
print("no")
local lock = player123.PlayerGui["Main-UI"].MainMenu.TeamsTab.Main.LockedTeam:Clone()
lock.Parent = child
lock.Visible = true
else
print("yes")
end
end
end
else
print("not frame")
end
end)