I have this script:
local player = script.Parent.Parent
repeat wait() until player.Character
game.Players.LocalPlayer.Character:WaitForChild("PlayerSkins").ChildAdded:connect(function(skin)
print("Auto saving...")
local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats")--Player key
local statstorage = player.Character:WaitForChild("PlayerSkins"):GetChildren()
for i = 1, #statstorage do
datastore:SetAsync(statstorage[i].Name, statstorage[i].Value)
print(statstorage[i].Value.." Saved succesfully!")
wait(.1)
end
print("Succesfully saved!")
end)
I want to test it but it won't do anything when a child is added..
Information:
Script is a NORMAL SCRIPT
Script is in STARTER PLAYER SCRIPTS
I tried:
DescendentAdded
ChildAdded
And none worked.. How do I make it work???

3 comments
if you're gonna be so short why won't you use comments?
I can't access datastore from a local script só there needs to be other way
there isn't a way without RemoteEvents and RemoteFunctions