Hiya, I am making this thing where an event occurs like every 2 minutes per say. After testing this it doesn’t seem to work. I do not get an output either. Any help is appreciated. Here is my script for reference
local InsanityTableEventList = {
{
name = "GainInsanity",
Function = function()
print("test")
end,
}
}
local Intervals = 5*10
local TimerValue = 0
RunService.Heartbeat:Connect(function(Seconds)
TimerValue += Seconds
if TimerValue > Intervals then TimerValue = TimerValue % Intervals
local EventChosen = math.random(#InsanityTableEventList)
local EventOccuring = InsanityTableEventList[EventChosen]
local EventOccuringName = EventOccuring.Name
local EventsFunction = EventOccuring.Function
print("an event occured "..EventOccuringName)
EventsFunction()
end
end)