Hello, I’m currently working on a character customization menu for my RPG project. How it works right now is through a LocalScript a cloned version of the player’s character will appear in the menu.
I have two sets of ears in ReplicatedStorage at the moment one for when a person clicks the ElfButton
and one for some clicks the GoblinButton
both ears also have the proper attachments needed in order to add to the player’s Humanoid.
I’m currently using a LocalScript for the Menu and a SeverScript for the player’s actual Character.
Here’s what I have so far for the LocalScript whenever someone would press the elf button
ElfButton.MouseButton1Click:Connect(function()
game.ReplicatedStorage.Events.ElfEvent:FireServer()
SkinTone:TweenPosition(UDim2.new(1.509, 0,0.759, 0), "Out", "Sine", 1, false)
local SkinTone1 = BrickColor.new("Pastel brown")
local ClotheTone = BrickColor.new("Black") -- Clothing to avoid looking naked
ClonedCharacter.Head.BrickColor = SkinTone1
ClonedCharacter["Left Arm"].BrickColor = SkinTone1
ClonedCharacter["Left Leg"].BrickColor = ClotheTone
ClonedCharacter["Right Arm"].BrickColor = SkinTone1
ClonedCharacter["Right Leg"].BrickColor = ClotheTone
ClonedCharacter.Torso.BrickColor = ClotheTone
end)
and here’s what happens so far in the SeverScript whenever the Event from the LocalScript is fired:
game.ReplicatedStorage.Events.ElfEvent.OnServerEvent:Connect(function(player)
local HumanButton = game.StarterGui.PlayerUI.CharacterMenu.Elf
local Character = player.Character
local SkinTone1 = BrickColor.new("Pastel brown")
local ClotheTone = BrickColor.new("Black") -- Clothing to avoid looking naked
Character.Head.BrickColor = SkinTone1
Character["Left Arm"].BrickColor = SkinTone1
Character["Left Leg"].BrickColor = ClotheTone
Character["Right Arm"].BrickColor = SkinTone1
Character["Right Leg"].BrickColor = ClotheTone
Character.Torso.BrickColor = ClotheTone
end)
Anything about how I would add the ears or destroy the ears on the player’s character (for whatever button they click respectively) will be great to know.