Hello, I’m currently trying to make a game with datastore saving systems. I used a youtube tutorial but there seems to be an error, can anyone help?
local players = game:GetService("Players")
local dataStores = game:GetService("DataStoreService")
local playerCoinsDataStore = dataStores:GetDataStore("PlayerCoins")
players.PlayerAdded:Connect(function(plr)
local PlayerCoins = Instance.New('IntValue')
PlayerCoins.Name = "PlayerCoins"
PlayerCoins.Parent = plr
Here’s the output error
ServerScriptService.Script:7: attempt to call a nil value
(The script is inside ServerScriptService as shown in the video
(If you want the video the link is below)