Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

A global :FireServer function?

Is there a possible way to do this? It would be mainly to just put at the end of the majority of scripts like.

_G.FireServer()

Hopefully someone understands what I'm getting at and can tell me if this is possible.

1 comment

0

Why not use a BindableFunction instead?

1 answer

✓ Accepted answer

Well _G is a table of stuff that you add to, so what you could do is in one script set a variable for that RemoteEvent instance or whatever then get to it from another script.

Heres what I did, first i create a script to set _G.event as a BindableEvent and also created a function for when it was called code, hierarchy

Then in another script I made sure that _G.event wasn't nil then fired to it code

result

But I don't recommend this because firing to the same instance over and over and over can build up traffic for it resulting in slow response times. Make different instances for differents things.

This discussion is preserved as it was. New answers, comments, and votes are closed.