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

how can i make this change the id of clothes?

if clothes == "pants" then
		player.Character:FindFirstChildOfClass("Pants").PantsTemplate = "rbxassetid://"..tonumber(clothesid)
	end

error attempt to concatenate a nil value

i think its because it dont want the numbers outside the speechmarks but idk how to fix it

6 comments

0

What is your clothesid?

0

No I do not think you can change the ID of your clothing items through a script or in anyway. Is this the answer you are looking for? Please explain your problem briefly.

0

cloth id doesnt matter, its all the same for every clothing

0

It does if you're not using the template image

0

How do you define "clothesid"? Are there any letters in "clothesid"? If it's empty or there is any letters, tonumber() will return nil.

0

clothesid are always the letters of the clothing item

1 answer

local clothesid = nil -- change this to the clothes id you'd find on the website.

-- idk what this line below means, doesn't make sense, if it has no purpose remove it.
	--if clothes == "pants" then
player.Character:FindFirstChildOfClass("Pants").PantsTemplate = "rbxassetid://"..clothesid
--end

2 comments

0

still doesnt work sadly

0

and you aren't showing us the whole script, we dont even know what clothes or pants is meant to be, fix your entire script using fn+f9

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