Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Editing the colors of an NPC from Local Script?

Asked by 4 years ago

Hello I'm trying to make a customization screen where the player will click on a skin tone and it will change the color of an NPC they are editing and when they are done the NPC will clone its stuff onto the player. Right now I'm stuck at the very basics, which is even editing the skin tone of the NPC. Here's what I have so far. The localscript is in ReplicatedFirst.

game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.MouseButton1Click:connect (function ()
    game.Workspace.Customizer["Body Colors"].HeadColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
    game.Workspace.Customizer["Body Colors"].LeftArmColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
    game.Workspace.Customizer["Body Colors"].LeftLegColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
    game.Workspace.Customizer["Body Colors"].RightArmColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
    game.Workspace.Customizer["Body Colors"].RightLegColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
    game.Workspace.Customizer["Body Colors"].TorsoColor = game.Players.LocalPlayer.PlayerGui.Starter.RightFrame.AsianDarkButton.BackgroundColor3
end)

Answer this question