|
| 31 Aug 2014 09:58 PM |
im making a basketball game & i want to have every players name organized
so i have a model named players & inside it is 8 stringvalues, named player1, player2, etc
i want it to change the value of them to the player's name
so player1 is mrpotatoman123
player2 is wakaflockaflame
etc
i realized this wouldnt work, itd rename more than just 1 player value
function PlayerEntered(newplayer) plist = game.Workspace.players
if plist.Player1.Value == "none" then plist.Player1.Value = newplayer.Name end end if plist.Player2.Value == "none" then plist.Player2.Value = newplayer.Name end
game.Players.ChildAdded:connect(PlayerEntered)
wat do |
|
|
| Report Abuse |
|
|
Qaeo
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 29238 |
|
| |
|
|
| 31 Aug 2014 10:03 PM |
nvm i got it debounce is love debounce is life
poker123456789 owes me 40k robux & theraptradingguest scammed vetrius |
|
|
| Report Abuse |
|
|
DADREW
|
  |
| Joined: 07 Oct 2007 |
| Total Posts: 1203 |
|
|
| 31 Aug 2014 10:03 PM |
Why not just use a table / global table?
one script: _G.players = {}
another script
wait() game.Players.PlayerAdded:connect(function(player) if (#_G.players > 8) then table.insert(_G.players, player.Name) --stuff else print'8 players' end end)
|| Karmavore || Add 70k posts || R$79 || |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 10:07 PM |
idk wat table/global tables r lol
but i got the script done
poker123456789 owes me 40k robux & theraptradingguest scammed vetrius |
|
|
| Report Abuse |
|
|
DADREW
|
  |
| Joined: 07 Oct 2007 |
| Total Posts: 1203 |
|
|
| 31 Aug 2014 10:11 PM |
this_is_a_table = {"here's a thing in a table", "sometimes used for admin commands", " or ban lists"}
_G.global_table = {"this is a global table", "they can be accessed through other scripts"}
|| Karmavore || Add 70k posts || R$79 || |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Aug 2014 10:13 PM |
bruh tables sound cool
ima start using those
poker123456789 owes me 40k robux & theraptradingguest scammed vetrius |
|
|
| Report Abuse |
|
|
DADREW
|
  |
| Joined: 07 Oct 2007 |
| Total Posts: 1203 |
|
|
| 31 Aug 2014 10:14 PM |
yeah man tables r da best
heresAsentence = {"I", "love", "tables", "!"} table.concat(heresAsentence, ' ')
>I love tables !
|| Karmavore || Add 70k posts || R$79 || |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 10:17 PM |
amen
poker123456789 owes me 40k robux & theraptradingguest scammed vetrius |
|
|
| Report Abuse |
|
|