|
| 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 |
|
|
| |
|
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 |
|
|
|
| 06 Jan 2015 08:28 AM |
OK - thanks. How would I actually do what i said though? :) |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|