I want to be able to add “fortune” for my player but for some reason it doesnt work, then i tried it with the other leaderstat “coins” and it works. From what i can tell everthing looks the same in the script so shouldnt it behave so?
This is the leaderstat script (in server script service):
local players = game:GetService("Players")
function playerSpawned(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local coins = Instance.new("IntValue", leaderstats)
coins.Name = "Coins"
coins.Value = 0
local fortune = Instance.new("IntValue", leaderstats)
fortune.Name = "Fortune"
fortune.Value = 0
end
players.PlayerAdded:Connect(playerSpawned)