So i'm making a game and i want to get a players skin tone onto a brick and i want to know how to do that. If you want to know what I am doing then I will tell you for more context. I am making a shooter game and the arms for the shooter game needs to be the color of the players arm so it matches up.
My code:
------Variables------ local PlayerName = game.Players.LocalPlayer.Name local Arms = game.Workspace.Arms local Camera = game.Workspace.Camera local Run = game:GetService("RunService") Run.RenderStepped:Connect(function() Arms.HumanoidRootPart.CFrame = (Camera.CFrame * CFrame.new(0,-1.5,0)) end) ------Hand Color------ while true do Arms.LeftArm.BrickColor = PlayerName("Left Arm").BrickColor Arms.RightArm.BrickColor = Arms.LeftArm.BrickColor end
Ok, there's multiple problems with your script. In the player variable, you assigned it the local player's name. Unless you're searching for it in players, the script is not gonna know what you're talking about. The left arm is apart of the player's character, not the player. And you don't have to put it in a loop.
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() Arms.LeftArm.BrickColor = character["Left Arm"].BrickColor Arms.RightArm.BrickColor = character["Right Arm"].BrickColor