Script below is for a textbutton that gives a new StringValue to a player and announce them as a Boy
teehee = script.Parent
player = game.Players.LocalPlayer
teehee.MouseButton1Down:connect(function()
local gndr = Instance.new("StringValue",player)
gndr.Name = "GenderPL"
gndr.Value = "Boy"
teehee.Parent.Parent.GenderText.TheGender.Text = "Gender: Boy"
teehee.Parent:Remove()
end)
This one follows up in another script and tries to find the value and give the clothes that the player needs based on the gender.
genderbased = player:WaitForChild("GenderPL")
if genderbased.Value == "Boy" then
local shirt = Instance.new("Shirt",character)
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=167295776"
shirt.Name = "NewShirt"
coroutine.wrap(function()
character:WaitForChild("Shirt"):Destroy()
end)()
local pant = Instance.new("Pants",character)
pant.PantsTemplate = pantsT[math.random(1,2)]
pant.Name = "NewPants"
coroutine.wrap(function()
character:WaitForChild("Pants"):Destroy()
end)()
end
Why doesn't it work?

1 comment
Wow seriously.. who downvoted this.. I'm sorry I try to learn scripting..