Trying to recreate the script of saving clothes in datastore that is posted on scriptinghelpers.org

Saving every time the player dies isn’t that bad unless you have 59 different obstacles.

hello there, I’m sorry for asking for bit more when it’s solved but,
can we make it so we can add some value into respective parts in BTN files and script reads what value is inside the clicked part and use that value number for make it into roblox clothing texture id and apply it to player and then saves it? sorry for being late for 3 days but I may ask you about this before it closes, thank you peashie.
-mari

Hey there!

Sure, place a IntValue into each button in the folder, and name it as ID, in the IntValue Value property place the id number 1564561561 (I mean your IDs), then iterate them with a code like this; should be 2 folders, you know shirts and pants are 2 different folders.

local URLstart = "http://www.roblox.com/asset/?id="

for i, btn in pairs(game.Workspace:WaitForChild("ClothsBTNs"):WaitForChild("Shirts"):GetChildren()) do
	btn:WaitForChild("ClickDetector").MouseClick:Connect(function(player)
		player.Character.Shirt.ShirtTemplate = URLstart..tostring(btn.ID.Value)
	end)
end

for i, btn in pairs(game.Workspace:WaitForChild("ClothsBTNs"):WaitForChild("Pants"):GetChildren()) do
	btn:WaitForChild("ClickDetector").MouseClick:Connect(function(player)
		player.Character.Pants.PantsTemplate = URLstart..tostring(btn.ID.Value)
	end)
end

It will check each one of those “button” parts, and use the IntValue called ID inside the part, to use it as the URL that will be used to place the texture.

2 Likes

hey there, the things you have suggested to me have worked very well and I love that, thanks for helping me out with making saving clothing system by this far, I also thank you for friending me on roblox through :hugs:
hope you will have more amazing days after this, I salute you.
also here is footage of saving clothing system working well in my game, it could be all possible because of you!

I gave you another solution to your recent respond(even through previous solution moved into your recent respond) and hearted your reply message, you are the best hero. thank you.
-happy mari

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.