How do i detect the time

i didnt even notice lmao

sadsdsfafsdhegsfdijdb hszx

I know the thread is over but I want to point this out.

Is there really a reason to be this rude? People are just trying to help, and he probably did test your code and it didn’t work. He probably isn’t advanced in scripting, so there is no need to have that condescending attitude against him. I still don’t get your rude replies to me. I mean, I guess I am thankful since it gave us the answer, but you could’ve been nicer. Is it really so hard to be nice to people instead of saying “don’t use this bad code I am going to have a heart attack”?

1 Like

Yeah so you arent advanced in scripting
if game.Lighting.ClockTime >= 18 and game.Lighting.ClockTime <= 19 then

For example let’s look at this code,
game.Lighting.ClockTime >= 18
Ok checks if the time is 18+ thats good
game.Lighting.ClockTime <= 19
Why time range? This means the check will pass if it is 18 or 19 always, this would result in duplication but it wont since the signal fires only once and you check if he is in storage which could be avoided if you just did time == 18 and you are done

Also just moving him could cause the AI code to break, bc he is being reparanted many times, so once he spawns next time, the AI script would just not work, better way would be to clone him and enable the script once in workspace

The same with the with this check
if game.Lighting.ClockTime >= 6 and game.Lighting.ClockTime <= 7 then

Just shows how you are inexperienced within roblox scripting, while you are trying to help others when you are just giving them code that has bugs and issues

Scripts are paused in ServerStorage. Nothing happens to the AI. Again, being as rude as possible to people. There is no need for this. Also, you’re being so condescending it’s just getting annoying at this point! The timeframe exists because, as I ALREADY MENTIONED, and as HE MENTIONED, his script runs too fast for the code to run at that specific time. ALSO, I used that as a broad example. I even mentioned it. You don’t need to have it within that timeframe, it’s just an example of what you could do. You treating people with such disrespect is shameful. I’m not inexperienced with ROBLOX scripting. I just want to help them solve their issue as quickly as possible, and you are right. I should have been more thorough with my explanations and not provided buggy code. I’ll try to improve on that.

1 Like

Scripts are paused in ServerStorage.

They arent. Or to be correct, they are but if the code starts running in workspace and you move it back to server storage, the script wont stop

Yes they do. Back up your sources next time. You can even try it for yourself!

REPLY TO YOUR EDIT: No. It still stops.

ServerScriptService and ServerStorage not working - Help and Feedback / Scripting Support - Developer Forum | Roblox

1 Like

Sources: trust me

Truly good source of information

Did… you even see the source I provided? Are we seeing the same reply? Have you even tried this for yourself???

1 Like

While we are at it, why not code your own time system, than use the one in roblox, which limits you to 24 hours and you need to adjust the time of speed specifically to achieve the time of day/night you want to have

Answer my argument. The thread is over.

1 Like

And surely you did try it, and you arent just making this up

I already said to answer my argument, you can test it for yourself! You’ll see that I’m right. You can’t say “okay, well I didn’t test it, and I don’t know if you tested it, so I must be right!”

1 Like

Umm I know it will not stop because I got something called experience and I’ve seen it happen

No you haven’t. The code stops. If anything, you’re the inexperienced person here.

1 Like

Yeah bud :laughing:
Don’t even try to tell me I’m inexperienced when you wrote that code

I already wrote my reasoning for writing that… you aren’t even reading my arguments, are you? I implore you. Go and try it. I know you’re wrong. The gall on you to say I’m “inexperienced” and act like you’ve seen everything and you’re a professional and still spurt out something so obviously incorrect is… shocking to me, really…

1 Like

The_Truth.rbxl (45.0 KB)
Try out this place file and look at output, it will be interesting

1 Like

Sorry I’m not going to download the obvious rat you installed onto it, please go try rat someone else with it

It’s an rbxl file! You know what, I’m done with the argument, hopefully anybody who stumbles upon this thread can also see how rude and disrespectful you’ve been. It’s truly shameful. You know what, I think I’ll do just what you did.

Fine if you are unable to download a .rbxl file that can do quite legitimately nothing except maybe crash your studio (which the file does not and would make me look like a clown, by the way if you really want to see if that happens go on and test it) I’ll even WRITE OUT THE CODE FOR YOU!

Both scripts inside ServerScriptService:

Script 1:

while task.wait(1) do
	print("Running code...")
end

Script 2:

local script_1 = script.Parent.Script_1

while task.wait(5) do
	if script_1.Parent == script.Parent then
		script_1.Parent = game:GetService("ServerStorage")
	else
		script_1.Parent = game:GetService("ServerScriptService")
	end
end
1 Like

Lol. Well, I think I’ve proved my point. I really hope you learn from this to be more respectful to people and admit when you’re wrong. It’s shameful. I hope you’re ashamed of yourself.

Best Regards,
VerySillySausages

1 Like