Hello, I am trying to make a script that fires a remote event whenever textbuttons inside of a surface gui are clicked, but it isn’t even cycling through the table. This is my code:
for i, v in pairs(script.Parent.SurfaceGui.Frame:GetChildren()) do
print(v.Name)
if v:IsA("TextButton") then
v.MouseButton1Click:Connect(function()
print("Yes")
script.Parent.Parent.Click:Play()
game.ReplicatedStorage.Remotes.DivisionSignIn:FireServer(v.Name)
end)
end
end