Can I put all my remotes in one script?

Ok! So I wanted to make a script called Main for my game!

I have one year of experience so I know that roblox code is from top to bottom.

Would I be able to make a main script for all my remotes and for example every remote in my game I’d do

rem.OnServerEvent:Connect(function()

Could I check if the remote was fired in non-order?

Example I have magic attacks in a game.

The first line was

Fireball.OnServerEvent

The second was Lightning.OnServerEvent

But the character has lightning instead of fireball would I be able to detect if fired in non-order?

Of course, remote event connections are listeners, therefor you are ‘Connecting’ them to a function. They do not get called in order per say.

Thanks this way I won’t be messy :slight_smile:

1 Like