I don’t get it, what’s this “string.sub” code?
Dont do it, that would actually then run 3600 times and u dont want that
U know what, forget if statement for now and just print TimeOfDay and see what kind of data do u get and if an event actaully fires
It’s a serverscript, It’s a simple script, when it’s 6 PM it basically gives them a gui.
I tried this before ^
string.sub("Hello!", 1, 2) would return “He” as they are the first two characters in the string.
It’s useful for making: Typewriter effects on UI, and gathering data from strings.
You could also do:
local output = string.split("18:00:00", ":") to have it divide it into 18, 00 and 00.
Then get ‘18’ by doing local A = output[1].
I am telling u to do this:
local Lighting = game:GetService("Lighting")
Lighting:GetPropertyChangedSignal("TimeOfDay"):Connect(function(player)
print(Lighting.TimeOfDay)
end
And then utell us what u get
Well this worked though, if it doesn’t work for u then its your game error since it works for me
game.Players.PlayerAdded:Wait()
game.Lighting:GetPropertyChangedSignal("TimeOfDay"):Connect(function()
print("bingo")
if game.Lighting.TimeOfDay == "18:00:00" then
print("gorilla is cute")
end
end)
Nothing, no errors or prints, nothing.
Let me try it out.
I’ll inform if it works
Bingo works, but the gorilla string wouldn’t show up at 18:00
Can you show me a video about you changing the time and all
Mainly because it worked for me
I use adonis admin to change time, i do :time 17,58 and wait till it hits 18:00 and test it.
do you have a video recorder to show me? Because it might have to do with Client and Server problem
Well everytime i record, the file is too big for devforum, pics can only help.
how do you use :time? since I don’t understand what you mean
Admin commands, adonis admin.
and just use :time
Ok then try this, don’t use admin and change the time manually
I’ll try it out, i’ll inform you if it worked or not
I think it was the admin after all, because now it worked.
Oh, Knew it. It was because the admin is a local script so the server wouldn’t see it
