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

[?] Giving a Player Clothes

Asked by 9 years ago

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?

0
Wow seriously.. who downvoted this.. I'm sorry I try to learn scripting.. PancakeChop 35 — 9y

Answer this question