So… As mentioned, the code wont work. The playeradded is working which isn’t the problem and i am even running checks to make sure that everything inside is a text button. Not even the playercheck will work. Does anybody know how to fix this?
game.Players.PlayerAdded:Connect(function(plr)
print("Hello!")
playerCount +=1
if playerCount > 0 then
plr.PlayerGui.warning.Enabled = false
plr.PlayerGui.carselector.ImageLabel.Visible = true
local z = plr.PlayerGui.carselector.ImageLabel.Frame.Frame.ScrollingFrame.Frame:GetChildren()
for i,v in ipairs(z) do
if v:IsA("TextButton") then
print("All is textbutton")
v.Activated:Connect(function()
workspace.carselectors.Value +=1
if workspace.carselectors.Value > 0 then
local module = require(plr.PlayerGui.ready.ModuleScript)
module.Start()
end
end)
end
end
end
end)