I've been trying to make a Save Data system (If someone could help me with that too) because any of what i've tryied worked then i tryied with some YT videos and while i was copying the script (I write them) i saw this error, the script is..
The error ocurrs on line 17 "(Player.UserId and Player.Piernas)" Any help?
local Pitote = game:GetService("DataStoreService"):GetDataStore("Pitote") local Pito = Pitote:GetDataStore("Condon") game.Players.PlayerAdded:Connect(function(Player) local Piernas = Instance.new("Folder", Player) Piernas.Name = "leaderstats" local Coins = Instance.new("IntValue", Player) Coins.Name = "Coins" Coins.Value = Pito:GetAsync(Player.UserId) or 0 Coins.Changed:Connect(function() Pito:SetAsync(Player.UserId, Coins.Value) end) end) game.Player.PlayerRemoving:Connect(function(Player) -- You forgot to put Player in the parameter Pito:SetAsync(Player.UserId, Player.Piernas.Coins.Value) end)
Data Stores are quite easy once you've done them a few times. Here's a helpful post!
https://developer.roblox.com/en-us/articles/Data-store