Remote event not firing

I have an ability that shoots 3 knives at once. The hit detection is server side using raycasts but the projectile are visually represented on the client, so there is not a physical projectile that the server can see. I have a few features in my game that can stop or redirect projectile, so obviously when this happens I must update the client to tell it to adjust the projectiles direction and speed.

An issue I am running into now is that I want to stop the projectile mid air and for some reason when I fire the remote event that updates each projectile it only works for one of them and the local script completely ignores the other 2 inputs. I have confirmed with printing that the server is most definately firing the event 3 times to all clients. Here is the code that does this on the server :

UpdateEvent:FireAllClients(workspace:GetServerTimeNow(),Direction,PreviousPos,0,identity)

The spawn event in the following local script runs once for each individual projectile. The server sends a unique identity for each projectile so that they can be differentiated across client and server :

Connections.SpawnConnection = SpawnEvent.OnClientEvent:Connect(function(TimeStamp,Direction,Pos1,Speed,ID)

		--------------------------------------------------------------------------------

		local frames = (workspace:GetServerTimeNow() - TimeStamp) / 0.0168 --Gets the no of frames passed
		local startPos = Pos1 + (Direction * frames * Speed)
		local CurrentSpeed = Speed
		local Identity = ID
		local TurnSpeed = 1
		
		--------------------------------------------------------------------------------

		--Spawns the knife
		local randomNo = math.random(1,2)
		local knife
		if randomNo == 1 then
			knife = RS.StoredObjects.MinuteHand:Clone()
		else
			knife = RS.StoredObjects.HourHand:Clone()
		end
		knife.Attachment.Ring:Emit(1)
		knife.Attachment.Blur:Emit(1)
		knife.Attachment.Blur.Enabled = true
		knife.Attachment.Ring.Enabled = true
		knife.Parent = game.Workspace
		knife.CFrame = CFrame.lookAt(startPos , (startPos + Direction))

		--------------------------------------------------------------------------------

		--Moves the knife
		local OldPos
		OldPos = startPos
		local running
		running = runService.Heartbeat:Connect(function()

			if OldPos ~= startPos then

				knife.Position = startPos
				OldPos = startPos

			end

			knife.Position += knife.CFrame.LookVector * CurrentSpeed
			knife.Orientation += Vector3.new(0,0,TurnSpeed)

		end)

		--------------------------------------------------------------------------------

		local UpdateConection
		UpdateConection = UpdateEvent.OnClientEvent:Connect(function(NewTimeStamp,NewDirection,NewPos1,NewSpeed,NewIdentity)
			
			print(Identity.." - "..NewIdentity)

			if NewIdentity == Identity then

				if NewTimeStamp ~= nil then --Runs if the knife is deflected
					
					frames = (workspace:GetServerTimeNow() - NewTimeStamp)
					startPos = NewPos1 + (NewDirection * frames * NewSpeed)
					CurrentSpeed = NewSpeed
					knife.CFrame = CFrame.lookAt(startPos , (startPos + NewDirection))

				elseif NewPos1 ~= nil then --Runs if the knife hits a obstruction

					running:Disconnect()
					knife.Position = NewPos1
					Debris:AddItem(knife,10)
					UpdateConection:Disconnect()

				else --Runs if the knife must be destroyed

					knife:Destroy()
					UpdateConection:Disconnect()
					running:Disconnect()

				end

			end

		end)

	end)

You can see that within the initial spawn event I have a Heartbeat event that moves the projectiles foward and more importantly the Update event. There should be 3 active update events when the projectiles are made but only one is firing, what is weirder is that this is a unique case as the 3 update events work fine in every other situation except this one where I want it to stop but only one of 3 stop. For context I have a timestop that is meant to stop projectiles. For some reason I am only getting this problem when the knives are created within an active timestopzone (A part that spawns in the workspace which the server detects to see if the projectiles are within one) , if the projectiles are outside of a timestopzone then move into one they all stop as expected.

Is the “SpawnEvent” the same as “UpdateEvent”

No, the spawn event is only used to create a brand new projectile , the spawn event then creates an instance of the update event that can be used to change the projectiles trajectory throughout its lifetime.

You can try adding print statements throughout your script to diagnose and find the issue

Then you have a mix up. The first code sample you provided is firing the “UpdateEvent” but the second code sample is connection to the “SpawnEvent”

I have been doing that to the best of my ability for a few hours now which is why I came here. The other 2 events simply are not printing on the other end.

It seems the issue lies within how these events are handled when the projectiles are initially within a timestop zone. Maybe the events are being handled incorrectly too so you adjust the script for those parts to actually fire it

Sorry I don’t quite understand.

You can actually try synchronizing it more is what I meant and handle the update event better that way