[Solved]Values Not Copying Over?
Asked by
5 years ago Edited 5 years ago
Yes, so i'm making a Datastore where I am copying Values from a pre-made folder and sending them over to the Player, the problem is that the Values wont copy, the names do but not the Values?
01 | local function NewPlayerData(player) |
02 | local NewData = Instance.new( "Folder" , player) |
03 | NewData.Name = "PlayerData" |
05 | for _, Stats in pairs (script.PlayerData:GetChildren()) do |
06 | local NewStats = Instance.new(Stats.ClassName, NewData) |
07 | NewStats.Name = Stats.Name |
08 | NewStats.Value = Stats.Value |
the function is called when the player joins.