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
 

Re: Help! Please?

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
14 Jul 2011 12:33 PM
function Player(plr)
wait(5)
repeat wait() until plr.Character ~= nil
for i, v in pairs(script:GetChildren()) do
v:Clone().Parent = plr.Character
p = plr.Character:GetChildren()
for i = 1, #p do
wait(0.0003)
if (p[i].className == "Hat") then
p[i]:remove()

if plr.TeamColor == BrickColor.new("Deep blue") then
b = script.Blue:Clone()
wait(3)
b.Parent = plr.Character
game.Lighting.Blue:Clone(1).Parent = plr.Character
plr.Character.Head.BrickColor = BrickColor.new("Bright yellow")


if plr.TeamColor == BrickColor.new("Bright red") then
wait(2)
script.Red1:Clone().Parent = plr.Character
script.Red:Clone().Plarent = plr.Character
game.Lighting.Red:Clone(1).Parent = plr.Character
wait(1)
plr.Character.Head.BrickColor = BrickColor.new("Bright yellow")
wait(1)
end end end end end end
game.Players.PlayerAdded:connect(Player)



How do i make this were if the players has Shirt then it deletes it and puts another one in it?
Report Abuse
Benjamint is not online. Benjamint
Joined: 18 Aug 2008
Total Posts: 228
14 Jul 2011 01:06 PM
shirtasset=""
pantsasset=""

function give(p,n,t)
if p:findFirstChild(n)==nil then
Instance.new(t,p).Name=n
end
end

function checkChar(char)

give(char,"Shirt","Shirt")
give(char,"Pants","Pants")
char.Shirt.ShirtTemplate=shirtasset
char.Pants.PantsTemplate=pantsasset

end

while true do
wait()
c=game.Players:getChildren()
for i = 1, #c do
if c[i].Character~=nil then
checkChar(c[i].Character)
end
end
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