Firing a remote event at a certain clocktime problem

Yeah i still don’t get it, all i need is just when the time hits 18:00 i want it to fire a remote event.

yeah it might not be hitting exxactly 18 or sumn due to it being a float or your time cycle is incrementing past it or sumn anyway i think its best if you use MinutesAfterMidnight in rather than timofday its more accurate and what ive always used

Alright, as you wish, something like this should work in your case then:

local Lighting = game:GetService("Lighting")
	if Lighting.ClockTime == 18 then
	   -- Fire event

which is more-less what @Angrybirdcharacter did, or well, told you to do.
Though this will work only once, as your cycle makes the problem, like I explained.

1 Like

Yeah i’ve tried that before, it doesn’t work :confused:

Ah, seems like Roblox automatically resets the ClockTime, I did not know that one, sorry for the inconvenience, I just assumed, since Roblox doesn’t reset properties like… GuiObject.Rotation and such, my bad.

@ApeRuss, could you try this out?

local diff = game.Lighting.ClockTime - 18
if diff * math.sign(diff) <= .25  then

What I basically did is get the difference and then multiplied it by either -1 or 1 to make it a positive number. Then finally check if it’s smaller than .25. Worked for me!