HalfX20
(Electra)
February 28, 2020, 3:03pm
#1
I want to click a block and it changes my skin colour to that block
It works however my skin colour doesn’t change??
function OnClick(hit)
local Hum = hit.Parent:FindFirstChild("Humanoid")
print("debug1")
local Skins = hit.Parent:FindFirstChild("Skin")
print("debug2")
if (Skins == true) then return end
print("debug3")
local skin = Instance.new("BodyColors")
print("debug4")
skin.Parent = hit.Parent
skin.HeadColor = script.Parent.BrickColor
skin.LeftArmColor = script.Parent.BrickColor
skin.RightArmColor = script.Parent.BrickColor
skin.TorsoColor = script.Parent.BrickColor
skin.RightLegColor = script.Parent.BrickColor
skin.LeftLegColor = script.Parent.BrickColor
end
script.Parent.ClickDetector.MouseClick:Connect(OnClick)
1 Like
Try this script
bin = script.Parent
function onTouched(part)
part.BrickColor = script.Parent.BrickColor
wait(.3)
end
connection = bin.Touched:connect(onTouched)
Also if you dont want to use my script try to change this local Skins = hit.Parent:FindFirstChild(“Skin”) to this local BodyColors = hit.Parent:FindFirstChild(“BodyColors”)
Hope this post was helpful
2 Likes
It is not “Skin”. It is “BodyColors”.
1 Like
Proxus
(Proxus)
February 28, 2020, 3:29pm
#4
MouseClick
returns the Player instance that clicked the part, not the character.
1 Like
HalfX20
(Electra)
February 28, 2020, 3:35pm
#5
Thanks to all of you. I swear i am so dumb. I keep saying to myself that, but then i do it over and over and yea i looked up on wiki and it’s body colours not skin Swear i’m dumb - Fixed it btw
1 Like