Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what errors in this event?

Asked by
tumadrina 179
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
game.Players.PlayerAdded:connect(function(plr)
        script.Parent.Text=script.Parent.Text+--this is the part which I don't know
end)

I am trying to make the scrolling frame to have everyone's name that is on the server.

0
is that a good question now? tumadrina 179 — 10y

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
10 years ago

Well I don't fully understand what you're trying to do but if I had to guess then put everyone's name that's in the server there.

For this then you would have to get a table of all of the current players in the game;

plrs = game.Players:GetChildren()

After that then you have to use table.concat to display the whole list..

game.Players.PlayerAdded:connect(function(plr)
plrs = game.Players:GetChildren() --Get All current Players
script.Parent.Text = script.Parent.Text .. table.concat(plrs," ") --display them all with a space in between
end)
--You cannot perform math on a string to make a certain text. The double periods is what we call string concatenation, it allows us to combine part of a string with another part that's outside of the current one.

-Goulstem

0
Thanks tumadrina 179 — 10y
Ad

Answer this question