So, I'm making a DataStore (to save the time of the game) and it is not working. I was looking on the Developer Page for Data Stores and was following the instructions. I have no clue on how to fix this. Edited Code: (no error and only part of Script)
local data = game:GetService("DataStoreService") local datastore = data:GetDataStore("ClockTime") game.Lighting.ClockTime = datastore game.Close:Connect(function() local success, err = pcall(function() datastore:SetAsync(game.Players:FindFirstChildOfClass("Player").UserId, 50) end) end)
It is setting the ClockTime
to 0
every time I join in my game car (and in studio). I do have API Services Enabled.
Thanks, b_mni.