51e376a2-443d-459c-a264-c36d7f4e4227

b127d870-7075-4b16-a307-832bea93b789

2 Likes

There’s a guy by the name of Suphi Kaner who made this video:

Its explained really well on how to do this and you also get to learn time syncing between server and client, have a nice day!

3 Likes

Doesn’t the Lighting service have properties: TimeOfDat and ClockTime?

Anyways, you can also use Instance Attributes to make a custom day or something.

1 Like

Have a NumberValue or Attribute that both the server and client can see, on the Server add to it by a set amount every set amount of time, numbers up to you. Then, on the client when the NumberValue or Attribute changes you tween Lighting.ClockTime to the value.

You’d need to setup logic on the server so that when the value goes above 24 it resets back to 0, and on the client when the value becomes 0 you need to set Lighting.ClockTime instead of tweening so it doesn’t tween backwards to 0.

b7c6b586-7927-4863-ab87-6926877ea073

He wanted to avoid tweening on the server, so that was my solution. To fix new people joining you just set the ClockTime to the value when the script starts before you start tweening.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.