Remotes or no remotes?

Hello everyone !

Got a question for you, what would be the best if for example I need to send the time from the server to the client every seconds (for example).

I reached the conclusion I can do this 2 way :

  • Have a numbervalue in replicated storage, make the server update it, and add a .Changed event on every client for that value
  • Use remote event to send the time to every client.

Thx for reading ! :slight_smile:

2 Likes

I’m kinda confused… Why can’t you let the client calculate the time? You don’t need to constantly send it, send it once, let the client handle the countdown if that’s what you’re going for. then send another event whenever a new countdown is required.

1 Like

It would save a lot of resources to use a .Changed event. Once every second wouldn’t make a big difference, but it adds up when you add more.

3 Likes

Thx but I need the time on the client and the server to be synced and accurate, I can’t use os.time() because it doesn’t give the tenth of a second. And tick is not accurate if used separated on the client and the server, thus why i need the tick from the server to get the offset for the client.

Please try what i said and tell me when you run into a problem. Good luck =)

1 Like

I was already using a .Changed event so i’m glad ur thinking the same :smiley:

1 Like

Oh okay, good luck with your game!

If a client makes a change to the Value in ReplicatedStorage the Value will Update… Because it’s a Local Script.

No, if the server makes a change to a Value in ReplicatedStorage it will update to all clients.
If a client makes a change then it’s only for them.

1 Like

Obviously, If a Server makes a change to something it replicates to all clients, What im saying is it could easily be spoofed if u make a .Changed function on the Client.

What is your use case for this scenario?

If a client changes something, it will only change for them.

And this post is already solved, you may leave now

I’m aware everything on the client is subject to being hacked and modified, I’m doing my security checks on the server so it won’t pause a problem if a client start messing with his stuff.

For accurate casting time in a spell system.

Oh, so are you doing visual effects on the client and you want it to be in sync with the rest of the server?

exactly, and I have casting time to counter the lag, well if I start to explain all my stuff it’ll be a long post haha

I haven’t done something like this before but what you’re doing makes sense, I won’t keep asking questions as to keep this thread concise lol

1 Like