Hello. I am trying to make it so that if the event is fired twice within one minute, it kicks the player.
It doesn’t work, do you know what the issue is?
Hello. I am trying to make it so that if the event is fired twice within one minute, it kicks the player.
local PlayerLastRecievedTimeMap = {}
game.ReplicatedStorage.Quests.Hundred.OnServerEvent:Connect(function(player)
if PlayerLastRecievedTimeMap[player] and (os.time() - PlayerLastRecievedTimeMap[player]) < 5 then
player:Kick("Quest completed too fast")
else
PlayerLastRecievedTimeMap[player] = os.time()
player.leaderstats.FairyDust.Value += 100
end
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.