hi! i want to make a script that when a player first joins the game they get a gui saying "Welcome" and then when they leave and join back the gui doesnt come back, i dont know how to do this i was gonna use datastores but this is my first time using them and i dont know how to use them at all and i dont know how they work. i made a small script here:
local data = {}
local datastore = game:GetService("DataStoreService")
local MainData = datastore:GetDataStore("FirstTimeLoaded")
game.Players.PlayerAdded:Connect(function(plr)
local succ, errormsg pcall(function()
MainData:SetAsync(plr.UserId.."//new user\\", plr)
end)
if succ then
print('worked')
else
print('Error While Loading')
wait(errormsg)
end
end)
i want it to get the data from the table in local data = {} and see if the player has joined before. please help me thanks.

2 comments
You wil need a remote event to check.
how would i do that tho?