Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Shirt ID grabber not working?

I'm attempting to make a GUI in which a player can enter an asset ID of a shirt *inside a textbox and then press a textbutton for it load on the players character, however I'm stuck. Anyone got an idea?

button = script.Parent
shirtid = script.Parent.Parent.ShirtID
plr = game.Players.LocalPlayer
char = plr.CharacterAdded:wait() or plr.Character


button.MouseButton1Down:connect(function()
	for i,v in pairs (char:children()) do
		if v:IsA("Shirt") then
			v:Destroy()
		end
	end
	local shirt = Instance.new("Shirt", char)
	shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=".. shirtid.Text
end)

3 comments

0

u doing it via textbox?

0

Yes

0

if sum is not working hmu

1 answer

button = script.Parent
Textbox = ?
shirtid = 0
plr = game.Players.LocalPlayer
char = plr.CharacterAdded:wait() or plr.Character


button.MouseButton1Down:connect(function()
    for i,v in pairs (char:children()) do
        if v:IsA("Shirt") then
            v:Destroy()
        end
    end
    local shirt = Instance.new("Shirt", char)
    shirt.ShirtTemplate = "http://www.roblox.com/asset/?id="..shirtid


end)

Textbox:GetPropertyChangedSignal("Text"):Connect(function()
	shirtid  = TextBox.Text
end)

6 comments

0

just specify ur textbox and if the rest of ur code is correct it should work

0

Tested it out and it's still not working

0

gimme a sec

0

yeah idk how to make the link work

0

Thanks for trying I appreciate it

0

Yeah I simple cannot get it to accept the link

This discussion is preserved as it was. New answers, comments, and votes are closed.