I have a datastore script which I want when a player for the first time ever joins the game has a Frame shown to them which is the tutorial popup.
local CoinsDataStore = game:GetService("DataStoreService"):GetDataStore("D$")
game.Players.PlayerAdded:connect(function(Player)
local CoinData = CoinsDataStore:GetAsync(Player.UserId)
local Coins = Instance.new("IntValue")
Coins.Name = "D$"
local NewPlayer = false
if CoinData ~= nil then
Coins.Value = CoinData
else
NewPlayer = true
CoinsDataStore:SetAsync(Player.UserId, 0)
end
if NewPlayer == true then
local Tutorial = game.StarterGui.Tutorial.Start
Tutorial.Visible = true
end
end)
D$ is the only data currency here, but my problem is that when a player first ever joins the game the Frame is not showing.

1 comment
game.StarterGui won't make it show up. Do Player.PlayerGui. (line 19)