Yes and now I have the new script made by @darkvrn
Not sure how to fix the Data Queue, usually happens when any kind of data is added, its especially odd since its only one thing being updated, i only issue is that pcall prevents errors, not warnings, plus it odd that 1 point is added to a queue while i have a level script that can handle a lot more.
@westyboy609 I have fixed the Data Queue:
ocal DataStoreService = game:GetService("DataStoreService"):GetDataStore("myDataStore")
debounce = false
pumpkins = game.Workspace.Pumpkins
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local timeingame = Instance.new("IntValue", leaderstats)
timeingame.Name = "Pumpkins"
timeingame.Value = DataStoreService:GetAsync(player.UserId, timeingame.Value)
timeingame:GetPropertyChangedSignal("Value"):Connect(function()
pcall(function()
DataStoreService:UpdateAsync(player.UserId, timeingame.Value)
end)
end)
game.Players.PlayerRemoving:Connect(function()
pcall(function()
DataStoreService:SetAsync(player.UserId, timeingame.Value)
end)
end)
for _,Pumpkin in pairs(pumpkins:GetChildren()) do
if Pumpkin:IsA("Part") then
Pumpkin.Touched:Connect(function()
if not debounce then
debounce = true
timeingame.Value += 1
wait(1)
debounce = false
end
end)
end
end
end)
I dont think the pcall’s are nessecary but it works either way.
Yeah, but it says here “Time,” not Pumpkin. It’s inside the KillOnTouch function.
looking at the script, the Variable of the pumpkins value is timeingame
, but he is using it as points
Yeah like what I have said he is updating “Time” not Pumpkin inside the KillOnTouch funciton.
Doesnt change my point, he is using it as points, not time
This is due to the fact that I copy and pasted a time script and forgot to edit some values, my mistake.
Now, sometimes it never updates on touch, and it says at its original value, and some players still have the -