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

Why Wont Datastore Save Or Load This Value From The Characters ShirtTemplate?

Asked by 5 years ago
Edited 5 years ago

So i am trying to make a datastore that saves the characters shirt, and pants, then loading it

So what i dont get is

I can change the current characters ShirtTemplate, to a new one with a remote event that fires it to do so like this:

character.Shirt.ShirtTemplate =  shirt2.Shirt.ShirtTemplate

and it changes just find

but when i do this

players.CharacterRemoving:Connect(function(character)
getstore2:SetAsync(players.UserId,character.Shirt.ShirtTemplate)
getstore3:SetAsync(players.UserId,character.Pants.PantsTemplate)
end)

yes i used different datastore keys for shirt and pants, but that shouldn't matter. why doesn't datastore follow the same thing as the other code i posted? why cant it SetAsync it and GetAsync it, when the character clothes changes why cant it save or load the pants and shirt template?

Its really confusing. Any help would be appreciated. Thank you

Answer this question