@AshRBX_dev

From this video, a RBXL file will be downloadable from the description that contains all of the working files from the video. If you have any problems with it, let me know!

@abdulrahman-zf2nn

ive been looking for this for months, this makes me revamp my whole game. its like a nice framework, this should be a standard of creating games. The creator is a man of focus, commitment, sheer f will. LoL

@Alvelex

GREAT QUALITY VIDEOS, i have never seen any other playlist like this one! KEEP GOING PLS! This is the first time i believe you can learn write clean and good code with youtube videos!

@vintenfn4394

The effort you put in this tutorial is just stunning. And please keep on using OOP. Sub earned ...

@somoody

Your tutorials are absolutely magnificent, please keep uploading.  Using OOP the way you do, is brilliant and I will now be playing around with this to see how much I can get done with it.  I'm working on a battlegrounds game currently and implementing this has put the project miles ahead.

@kaleoscreations

This is THE BEST Roblox scripting video. I completely rewrote my simple game after watching this and your previous video, and it's 10x better now. You've earned my sub!

@Ghillis_Peyton

for anyone wondering how to make this work with arguments, add ... at the end of every function declaration and call. Ill give the example code I made, but I did change some of the names to fit my naming convention a bit better. If anyone doesn't know, ... basically means any amount of arguments.

--in event listener
--server-clients
function module:AsyncClients(clients:table,...)
	forloop.forLoopsForClassMethods(self.SyncClient,clients,...)
end
--server-> all clients
function module:AsyncAllClients(funcName:string,...)
	rs.Events.Async:FireAllClients(self.Name,funcName,...)
end
--server->singleClient->Server
function module:SyncClient(client,funcName:string,...)
	rs.Events.Sync:InvokeClient(client,funcName,...)
end


--Client->server->client
function module:SyncServer(client,funcName:string,...)
	rs.Events.Sync:InvokeServer(funcName,...)
end
--client->server
function module:AsyncServer(funcName:Function,...)
	rs.Events.Async:FireServer(funcName,...)
end

--in forloop
return {
	forLoopsForClassMethods = function(func,data,...)
		for client, FuncName in pairs(data) do
			func(nil,client,FuncName,...)
		end
	end
	
and in event listener
local success,errorMSG = pcall(function()
		rs.Events.Async.OnClientEvent:Connect(function(trace,func,...)
			if self.AsyncFuncs[func] then return self.AsyncFuncs[func](...) end
		end)

		rs.Events.Sync.OnClientInvoke= function(funcName,...)
			if self.SyncFuncs[funcName] then return self.SyncFuncs[funcName](...) else return nil end
		end
	end)
	
	if not success then 
		warn(errorMSG)
		rs.Events.Async.OnServerEvent:Connect(function(player,func,...)
			if self.AsyncFuncs[func] then return self.AsyncFuncs[func](player,...) end
		end)

		rs.Events.Sync.OnServerInvoke= function(player,funcName,...)
			if self.SyncFuncs[funcName] then return self.SyncFuncs[funcName](player,...) else return nil end
		end
	end
	return self

------FOR EXAMPLE ON HOW TO USE-----
Server:
EventHandler:AsyncClients(clients,"test1","Test2")

client:
local sync ={
	["TestOnClient"] = function(arg1,arg2)
		print(arg1,arg2)
	end,
Output=>"test1 Test2"

}

@Sanchayan_Mallick

It might not be a good idea to utilize a single remote function for all your events. This is because if two remote functions need to be called simultaneously, and one of them takes longer to return a value, it will delay the execution of the other remote function calls as well, which could have a significant impact on the game.

@Rhothbert

Really great, informative content, will hopefully see more videos from you in the future.

@Vortex-qb2se

Been doing something similar for years, but with a couple more events. This is slightly better organized than my system, though, so I'll give it a try, thanks. Not that I have time to develop as uni student, but whenever I do I'll make sure to remember and give it a try.

It's funny how almost 90% of the things you do are nearly identical to what I used to do. The way you structure your scripts, the client and server scripts, and the system itself. I feel like I'm watching myself script 😂

@selo_the_great

My solution to 17:50 is i would pass "self" as an argument to the loop function then use it instead of nil since passing nil to these : functions are dangerous and prone to error if self is used at all

@speedyg2295

Great video. And thanks for putting the code up. Helped to find where i missed.

@seonmc1295

How would I fire a event with arguments?

	['updateCoins']	= function(value)
		game.Players.LocalPlayer.start.playerScreen.Stats.Coins.Frame.TextLabel.Name = value
		return true
	end,

this is my thing: eventHandler:synchronousClient('updateCoins')

@randallmason2042

Very great content! I just started designing a game and I am working on using this model after watching the last few videos.

@doughbnut

i love ur channel you need more followers, and can we get another series tutorial for like tycoon games? there's no good tutorials for it :)

@LeapInno

Thank you for explaining this topic.

@ottoman.2

The best tutorial I ever seen keep going

@Wolfiy044

Great video but can you show us how to save shop data to so if a player buy something in the shop and leave it will save what he bougth

@Ghillis_Peyton

I dont know if im misunderstanding, but for remotefunctions, or sync calls, wouldn't the listener not work? Since it returns a value to the invoke, it returns it to the handler. this skips the sync functions passed in on the listeners. So to get a value back from an invoke you would have to edit some of it like:

function module:SyncServer(client,funcName:string,...)
	return rs.Events.Sync:InvokeServer(funcName,...)
end
instead of 
function module:SyncServer(client,funcName:string,...)
	rs.Events.Sync:InvokeServer(funcName,...)
end


and then get the data when you call the SyncServer()
local Answer = EventHandler:SyncServer("GetAnswer").

I could be misunderstanding, but this is the only way I could get sync to work

@ArialSoftware

right on time!