generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Personal Bricks

Previous Thread :: Next Thread 
cheez55 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. RawrBot
Joined: 22 Aug 2008
Total Posts: 832
21 Jul 2011 09:33 PM
Never mind.
Report Abuse
smurf279 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image