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 » Scripters
Home Search
 

Re: BodyTorso

Previous Thread :: Next Thread 
mario118118 is not online. mario118118
Joined: 05 Jul 2012
Total Posts: 245
01 Sep 2015 12:12 PM
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character

while wait(2) do
char.Torso.BrickColor = plr.TeamColor
end

This script works fine, but if you die, your characters torso returns back to yellow. ?
Report Abuse
XYuy is not online. XYuy
Joined: 24 Dec 2010
Total Posts: 5628
01 Sep 2015 12:16 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
while true do
if char:FindFirstChild("Torso") then
char.Torso.BrickColor = plr.TeamColor
end
wait()
end
end)
end)
Report Abuse
XYuy is not online. XYuy
Joined: 24 Dec 2010
Total Posts: 5628
01 Sep 2015 12:18 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
while true do
if char:FindFirstChild("Torso") then
char.Torso.BrickColor = plr.TeamColor
end
wait()
end
end)
end)

Make it a normal script in ServerScriptService (or if you are untidy, workspace)
Report Abuse
XYuy is not online. XYuy
Joined: 24 Dec 2010
Total Posts: 5628
01 Sep 2015 12:19 PM
Tested it in studio, works fine.
Report Abuse
mario118118 is not online. mario118118
Joined: 05 Jul 2012
Total Posts: 245
01 Sep 2015 12:33 PM
Thanks!
Report Abuse
XYuy is not online. XYuy
Joined: 24 Dec 2010
Total Posts: 5628
01 Sep 2015 02:35 PM
Here is a script I made.

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
while true do
for i,v in pairs(char:GetChildren()) do
if v.Name == "Shirt" or v.Name == "Pants" or v:IsA("Hat") or v:IsA("CharacterMesh") then
v:Destroy()
end
if v:IsA("Part") then
if v.Name ~= "Torso" then
v.BrickColor = BrickColor.White()
else
v.BrickColor = plr.TeamColor
end
end
if v:IsA("Part") then
if v:FindFirstChild("face") then
v.face:Destroy()
end
end
end
wait()
end
end)
end)


It changes all the body parts to white, except the torso, which changes to the TeamColor.

It removes all hats, removes the character's face, and makes it a default package.


You are welcome.
Report Abuse
XYuy is not online. XYuy
Joined: 24 Dec 2010
Total Posts: 5628
01 Sep 2015 02:41 PM
I made an example here:

http://www.roblox.com/games/290934558/stats
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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