If you mean storing a constructed signal in a modulescript, then it should.
Is it possible to fire remotes from inside a module script?
Fundamentally, there is no difference between a ModuleScript
and a script, except for the fact that a module can return a value. I havenāt used BridgeNet yet, but whatever can be done with Script
s/LocalScript
s, can also be done with a module.
First of all, great module man I appreciate your work, and keep it up!
I came across 2 errors tho
At line 727 in āServerBridgeā self.Name seems to be nil (This caused Bridge:Destroy() to error)
serdeLayer.DestroyIdentifier(self.Name)
Fix
serdeLayer.DestroyIdentifier(self._name)
Iāve checked the key inside of receiveDict and sendDict and they both match up the self._name string so this should do.
The second error is caused by any ābridgeā being invoked with ServerInvoke/InvokeServerAsync from a different client.
ReplicatedStorage.Modules.BridgeNet.ClientBridge:125: invalid argument #1 to 'spawn' (function or thread expected)
Stack Begin
Script 'ReplicatedStorage.Modules.BridgeNet.ClientBridge', Line 125
Stack End
On line 120 in āClientBridgeā at the elseif statement, āthreads[uuid]ā seems to be nil for clients that did not invoke this bridge. Iāve implemented this as a simple fix although Iām unsure if this would break/ cause problems for anyone else.
local uuid = args[2]
if threads[uuid] then
table.remove(args, 1)
table.remove(args, 1)
argCount -= 2
task.spawn(threads[uuid], unpack(args, 1, argCount))
threads[uuid] = nil -- don't want a memory leak ;)
end
Donāt know how you tested it, but read the reviews on the main post. In my case BridgeNet reduced the ping 30x. This has tons of practical uses, I personally used it for waist C0 replication to server, which would be literally impossible to do without bridge net (Or it would cause the ping to be 3k+, as my tests showed).
Iām interested - what changed in your replication data? If possible, could you use my plugin to check out the differences before and after using bridgenet? https://devforum.roblox.com/t/packet-profiler-accurately-measure-remote-packet-bandwidth/1890924
Iām mainly curious since I also replicate C0 data for player head rotation, and am interested in what kind of optimizations are taking place.
So this is the code I was using without bridge net. For my gameās purposes I needed the rotation to be replicated exactly to the server, not just to other clients, + even if I replicated to other clients only, ping results would be the same if not worse.
So with this code the ping was 3K+ if there were 100 players on the same server
I only changed the repEvent:FireServer line with firing a BridgeNet remote, and on the server listening to that BridgeNet remote, nothing else changed. The ping dropped down to on average 100 ping with 100 players on the same server.
Iāve also had this problem before but managed to fix it by doing
Add task.wait() before creating a bridge.
Thanks for the report! Iāll definitely fix this in the next version alongside a bunch of other changes.
OMG, this is a fantastic module. Saved me a ton of time
a small question from a wally user;
Is the current wally version (v0.1.0) the same as the latest version (v1.9.8-beta)?
The wally version should be on 1.9.9, not 0.1.0. Curious, where are you getting the 0.1.0 number from?
Oh yeah, I just checked wally-index and found it.
The docās installation page.
Hi, great module!
Unfortunately though, I am getting this error spammed every second in my game right now and I donāt think Iāve done anything wrong;
This isnāt breaking anything I donāt think but Iād just like to make sure.
Thanks!
What are you passing In Bridge:Connect() ?
This error occurs when you pass an invalid parameter into :Invoke. Iāll see if I can improve the typechecking/error messages in 2.0 which will release shortly.
If this isnāt the issue, please send me what youāre sending over / the server sided code.
Hey bomb, Iām having a replication issue that I canāt seem to figure out, Iām creating the bridge on both the client and server, starting it aswell yet still have issues, if I WaitForBridge in external scripts it just infinite yields/the code below it doesnāt work.
You need to require BridgeNet before running the start function.
Oops just noticed that, I scrunched the code together for screenshot purposes but yeah I require it before starting.
Hereās a complete picture
Made a hotfix for this issue. Itās not supposed to happen, but BridgeNet was designed for single-script architecture. It should be fixed in this latest release that Iām about to put out.