I don't have any idea how to put all the players in a server into textbuttons then when they are clicked by the textbutton with their name they get notified i am still trying to figure out but i don't have a clue of how i would start it if i am not clear then i will make it more clear Also if you want to know i am trying to make a phone where you can call people through it.
I have this
script.parent.Text = "whatever "..game.Players.LocalPlayer.." whatever"
and it works but i am not sure if it will put the other player's name on it if you know if that will happen then please tell me
I do have an idea. You can use the PlayerAdded event to add people to a table. Then, you’d just have to make the table show up on a text button. As for the notifying thing, you’d have to use a remote. Not sure what you would do there though
For making players go into a text button you can try this. (Sorry if this doesnt work)
game.Players.PlayerAdded:Connect(function(plr) local Button = Instance.new("TextButton") local ClickScript = [the script to detect a click]:Clone() ClickScript.Parent = Button Button.Name = plr.Name Button.Text = plr.Name Button.Parent = [the gui] end) game.Players.PlayerRemoving:Connect(function(plr) for _, e in pairs([the gui]:GetChildren()) do if e.Name = plr.Name then e:Destroy() end end)
This script is just for adding the buttons. This does not handle clicking the buttons, sending remote events to the client side, or making the buttons look nice/sorting them. It just creates them and puts them into the gui.