Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Recolor Limbs onTouch Script help?

How do I use Vector3 or Color3 to put into a brick; when they walk through the brick, it recolors all limbs. How would I do this?

1 comment

0

You don't use Vector3 or Color3 to edit a color of a brick but the data-type of changing the property of BrickColor is BrickColor

1 answer

✓ Accepted answer
brick = workspace.Brick --rename it 

brick.Touched:connect(function(hit)
	if hit.Parent.ClassName == "Model" and hit.Parent:FindFirstChild("Humanoid") then
		brick.LocalScript:Clone().Parent = hit.Parent --look below for the code for localscript
		hit.Parent.LocalScript.Disabled = false
	end
 end)

v LocalScript v

if game.Players.LocalPlayer.Character:FindFirstChild("BodyColors") then
game.Players.LocalPlayer.Character.BodyColors.RightLegColor = BrickColor:Random()
game.Players.LocalPlayer.Character.BodyColors.LeftLegColor = BrickColor:Random()
end 

Ha done! Reputation pl0x

4 comments

0

Do these 2 go together? And how would I change it so it turns the player all black?

0

Huh just change the BrickColor . Go here for more info: http://wiki.roblox.com/index.php?title=BodyColor_(Property)

0

Points please

0

If you keep helping me, I keep giving points c:

This discussion is preserved as it was. New answers, comments, and votes are closed.