Player script problem? (revised, no progress)
I want to make this script create a textbutton each time a player enters and when they leave the button will be destroyed. Please help i have been on this same script for the past few days. I seriously need help with this.
A look at my explorer: http://gyazo.com/dc737ffcde271877b05b4d0f6e846c10
02 | for num,p in pairs (game:GetService( "Players" ):GetPlayers()) do |
03 | for _,obj in pairs (script.Parent.Parent:GetChildren()) do |
04 | if obj.Name = = "Player" then |
08 | local gui = script.Parent:clone() |
09 | gui:ClearAllChildren() |
10 | gui.Position = gui.Position + UDim 2. new( 0 , 0 , 0 , (num- 1 )* 50 ) |
12 | gui.Parent = script.Parent.Parent |
17 | game.Players.PlayerAdded:connect(edit) |
18 | game.Players.PlayerRemoving:connect(edit) |