Are all Events Delayed?

They don’t. Only the servers which perform requests like datastoreservice do.

Maybe others do but RunService doesn’t. A service essentially is just a collection of functions.

if you still don’t believe me here’s a living proof.

This module can handle 400 bullets a second, and yes it uses RunService.

1 Like

Alright I’ll take your word for it. Gonna see if this method works.

Yeah I tried that method, it works fine. Only problem I have for it is what about cannonballs? You’d have to use some crazy math to make the part start moving downwards after a while. And if you say just unanchor it, well you can’t check the coordinates for it as it’s unpredictable once it’s unanchored.

It’s not clear to me if anyone has said this yet. But if that event handler is running server-side, then the “delay” you’re seeing is just network lag. On your computer, you touch the part. Some time later, the server learns that happened. Then the server’s event handler runs, and changes the color of the brick for example. Then another amount of time later, your client learns of this and you see the new color. In other words, the delay is just ping.

You don’t have to use crazy math there’s already a simple equation someone made for it. And no don’t unanchor it.
local Gravity = 100
local Velocity = Vector3Direction * Speed- (Vector3.new(0,Gravity,0) * ElapsedTime)
Position = Projectile.Position + (Velocity * TimeFromPreviousFrame)

RunService.Hearbeat:Connect(function(TimeFromPreviousFrame) -- TimeFromPreviousFrame is hearbeat gives us back

Reading up on your original issue, this seems like an exceedingly large replication delay.

I have a few questions trying to understand this better:

  • What ping do you get playing in your Roblox game? You should be able to view this by pressing F9 to open up the developer console
  • Are there any server scripts that are running at high percentages that could be lagging your game down? (You can view this using the Script Performance tab.)
1 Like

First Question: 80-100
Second Question: Far from what I’ve seen there aren’t any scripts causing much disruption for the server.

Also @0Shank I’ll try that and see if it works.

What’s going on here is that you need to take into account that Roblox uses distributed physics: Physics for a given part is simulated on the whichever client “owns” that part. That means that if you listen for a Touched event on that part that is owned by some other client, you will see a replication delay between the the client who owns the part seeing a touch happen, and them sending a message across the network to everyone else letting them know that the Touched event should fire.

You can control this by calling Part:SetNetworkOwner(player) (or Part:SetNeworkOwner(nil) to force server ownership). If you make this call to set the ownership, then Touched events for that part should always be instantaneous on the client/server you set the ownership to, since they’re the one doing the physics simulation now.

1 Like

This is happening to me recently, I would say it is a Roblox bug. i will report it.

https://devforum.roblox.com/t/touched-rbxscriptsignal-seems-to-be-delayed/780830/21

same… but I used region3s. I’m making a beat maker where i time marker touches the note blocks while passing though it. but its not on time making it off beat