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

Why won't a shirt id work when I put it in with a script?

Hello! I am working on a shirt id thing, but it doesn't seem to work. It takes the id from the TextBox, puts it in the player's shirt, but the shirt doesn't pop up. I'm confused on how to fix this. Code:

script.parent.MouseButton1Down:connect(function()
local player = game.Players.LocalPlayer
rbxassetthing = "rbxassetid://"
EditShirtID = script.Parent.Parent.EditShirtID
player.Character.Shirt.ShirtTemplate = rbxassetthing .. EditShirtID.Text
end)

3 comments

0

is it a local script. Also I would try changing parent to Parent on the first line.

0

yes, it is a local script.

0

I would try changing 'MouseButton1Down' to 'MouseButton1Clicked' on the first line.

1 answer

✓ Accepted answer

I am not to sure how to do this but you need to get the id and keep subtracting numbers off of it until the layout of the shirt is shown. This might take a while but thats how roblox reads that the shirt should be wrapped around the character.

Instead of getting the ID from a text box maybe try making a wardrobe GUI like in Roblox High school 2!

Hope that helped.

2 comments

0

This kind of helps, i'll have to find out a way to keep subtracting until the layout is shown, cause I dunno how to detect the layout, but yes this helps. Also, I can't use a wardrobe gui, as it's meant to be used with ids so the player can use whatever shirt they want.

0

Welovegod1029384756, you can get a part with a decal inside of it and find a way to get the text info from the textbox and make that the texture of the decal which will automatically give you the shirt wrap id!

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