Hey developers,
I’m fixing up my game for a new update when I realized I was going to do an event for them. I want it so when the player joins the game, it will create a value that will be stored in the player.
Once that has been created, it will check a datastore to see if they player has already joined during the event, which will be toggled on if the player did join during the event.
I’m having a problem where I need it to check if the player has joined during the event, but I have no clue on how I would make that happen. Would anyone so far help me with this script?
--// Variables
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetDataStore("RWE_Awarded1K")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Gears = ReplicatedStorage:WaitForChild("Gears")
local Clean1k = Gears["1K Clean"]
--// Functions
local function awardClean()
end
--// Script
game:GetService("Players").PlayerAdded:Connect(function(player)
local JDE = Instance.new("BoolValue")
JDE.Name = "Has1kClean"
JDE.Parent = player
local DownloadedData = DS:GetAsync(tostring(player.UserId))
local Response, Success = pcall(function()
return DownloadedData
end)
if Success then
end
end)