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: Putting on CharacterMesh

Previous Thread :: Next Thread 
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
05 Jan 2015 03:03 PM
Hi guys!
I have this in a localscript in StarterGui

local TeamColor = BrickColor.new("Bright blue")

local Player = game:GetService("Players").LocalPlayer
local function Check()

-- here

end Player.Changed:connect(Check)


and I want to make it so that where it says --here, it takes off the players Left Arm and puts on a Left Arm CharacterMesh that is in the Workspace.
I kinda have this
if ((v == "TeamColor") and (player.TeamColor.Name == "Bright blue")) then
if player.Character and player.Character:FindFirstChild("Left Arm") then
player.Character.LeftArm:Destroy()
end
but I'm not really sure how to do it :D
Any help would be appreciated! Thanks
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
05 Jan 2015 03:13 PM
Bump!
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
05 Jan 2015 03:14 PM
"local Player = game:GetService("Players").LocalPlayer"

no

local Player = game.Players.LocalPlayer
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
06 Jan 2015 08:28 AM
OK - thanks.
How would I actually do what i said though? :)
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
06 Jan 2015 12:10 PM
Bump!
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
06 Jan 2015 12:13 PM
find the existing characterMesh

If exists destroy it.
clone the desired Mesh
parent it to the character

if no CharacterMesh exists
clone the desired Mesh
parent it to the character


BTW, this won't work with filtering enabled.
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
06 Jan 2015 12:15 PM
Thanks! Could you maybe give an example of this bit on how would I do it in script please.. "clone the desired Mesh and parent it to the character"...? Thanks! I can do the rest :)
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
06 Jan 2015 12:17 PM
local mesh = game.Workspace.Mesh:Clone()
mesh.Parent = --(Your Character Variable Here)
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
06 Jan 2015 12:18 PM
Thanks!! And then to remove it from them...I can do that...but, how would I put back their original charactermesh and clothing?
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
06 Jan 2015 12:20 PM
In that case, do

local oldmesh = --(parent chain for the left arm mesh):Clone()

when you want to put it back do

oldmesh.Parent = --(Your Character Here)
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
06 Jan 2015 12:23 PM
OK! Thanks! I think I can do that :D
I'll let you know if I need any help... xD
Thanks again!
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