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.