Hi, I'm making a game, and I have a StarterCharacter set, and I have a GUI to change the gender of the character. The button for female works fine, but the button for male doesn't work at removing assets from the female avatar.
Video example:
https://youtu.be/M2PWZLBzOjY
The Script in question (Not a LocalScript):
local plr = script.Parent.Parent.Parent.Parent.Parent script.Parent.MouseButton1Click:connect(function() if plr.FemaleAvatar == true then plr.Character:WaitForChild("Hair"):Destroy() plr.Character.Head.face.Texture = "rbxasset://textures/face.png" plr.FemaleAvatar = false end end)
Ah, simple mistakes. It's fine tho, you just forgot the value part.
local plr = script.Parent.Parent.Parent.Parent.Parent script.Parent.MouseButton1Click:Connect(function() if plr.FemaleAvatar.Value == true then plr.Character:WaitForChild("Hair"):Destroy() plr.Character.Head.face.Texture = "rbxasset://textures/face.png" plr.FemaleAvatar.Value = false --//When you have a global value, you need to add that .Value end end)
Lemme know if you have some errors