Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gui = script.Parent
- local buttons = gui:GetChildren()
- for _,button in pairs(buttons) do
- if button:IsA("GuiButton") then
- button.Activated:Connect(function()
- local success = game.ReplicatedStorage.TeamChange:InvokeServer(button.Name)
- if success ~= true then
- gui.Error.Visible = true
- wait(1)
- gui.Error.Visible = false
- else
- gui.Success.Visible = true
- wait(1)
- gui.Success.Visible = false
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement