cheez55
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 646 |
|
|
| 21 Jul 2011 09:16 PM |
| If I want to make an individual brick for everyone in the server(including the ones that join afterward) with the name of the player? So if I'm in the server with some guy named Bob, 2 bricks would appear: 1 named cheez55, the other named Bob. |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 21 Jul 2011 09:22 PM |
game.Players.PlayerAdded:connect(function(Player) Instance.new("Part", Workspace) --[[Your probably going to want to edit the brick after this part of the script]] Part.Name = Player.Character.Name end) |
|
|
| Report Abuse |
|
|
cheez55
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 646 |
|
|
| 21 Jul 2011 09:23 PM |
| Ok. But what about the Players that are already in the game? |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 21 Jul 2011 09:26 PM |
| The script runs whenever a new person enters the game. |
|
|
| Report Abuse |
|
|
cheez55
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 646 |
|
|
| 21 Jul 2011 09:27 PM |
| I'm running this at SB and some people might already be there when I run it. I'm not always the first one there. |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 21 Jul 2011 09:32 PM |
Players = game.Players:GetPlayers() for _,v in pairs(Players) do Instance.new("Part", Workspace) --[[Edit the brick after this part of the script]] Part.Name = v.Character.Name end
game.Players.PlayerAdded:connect(function(Player) Instance.new("Part", Workspace) --[[Your probably going to want to edit the brick after this part of the script]] Part.Name = Player.Character.Name end)
|
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 21 Jul 2011 09:32 PM |
game.Players.PlayerAdded:connect(function(player) local model = Instance.new("Model",workspace) local hum = Instance.new("Humanoid",model) local part = Instance.new("Part", model) part.Name = "Head" model.Name = player.Name hum.Health = 0 hum.MaxHealth = 0 part.Anchored = true part.Position = Vector3.new(0, 0, 0) end) |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
| |
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 21 Jul 2011 09:33 PM |
Use this I'm not sure why I made game.Players:GetPlayers a variable
for _,v in pairs(game.Players:GetPlayers()) do Instance.new("Part", Workspace) --[[Edit the brick after this part of the script]] Part.Name = v.Character.Name end
game.Players.PlayerAdded:connect(function(Player) Instance.new("Part", Workspace) --[[Your probably going to want to edit the brick after this part of the script]] Part.Name = Player.Character.Name end) |
|
|
| Report Abuse |
|
|