I am trying to script a leaderboard type thing that shows a list of players in the game. Not the regular roblox one. Its in a frame that list people in the server. For example: (names of people in the game) TrollD3, BSInc., Swagg, DeezNuts, guest2334, idgaf532, Gottem321,
This is the script I have so far: EDITED!! I want the name to be posted inside the txtbutton and to remove that textbutton when someone leaves. Its not working.
--OnEnter: lol = 5 game.Players.PlayerAdded:connect(function(p)--Here script.Parent.Text = "p.Name" script.Parent:clone script.Parent.Parent.Position = script.Parent.Position + UDim2.new(0,0,lol*1.6,0) end) -- OnLeave: game.Players.ChildRemoved:connect(function(p)-- Here script.Parent.Text = "p.Name" script.Parent.Parent.Position = script.Parent.Position + UDim2.new(0,0,lol/1.6,0) end)
You made a silly mistake with your parameters and where they go.
--OnEnter: lol = 5 game.Players.PlayerAdded:connect(function(p)--Here script.Parent.Parent.Text = p.Name lol = 5 script.Parent.Parent.Position = script.Parent.Position + UDim2.new(0,0,lol*1.6,0) end) -- OnLeave: game.Players.ChildRemoved:connect(function(p)-- Here script.Parent.Parent = p.Name script.Parent.Parent.Position = script.Parent.Position + UDim2.new(0,0,lol/1.6,0) end)
Umm, but Shouldn't Clone Event be wrote ":Clone()", not ":clone"? Also, Shouldn't Player be Wrote player, Not p? I am not sure, don't ask me.