So when you say in the Example function asdasd:Start() local Player = game.Players:WaitForChild("iGottic") self:FireClient(Player, "howmanyfruit", 5, "banana") end
Is the Remote named “howmanyfruit” automatically being created?
No remote is being created, it uses the only one remote
So basically by putting in the 2nd argument called “Meme channel” which a it says is the Remote that will work itself then I would have to use
ListenToServerEvent(String name, function)
? Sorry this API for some reason Is messing with me a bit. Also it says FireClient idk if that is a typo in the code bit
I’m currently updating the API to make it more clear and fix those typos. Keep an eye peeled for the changes!
If the changes still are confusing, let me know ^v^
These changes are done! Look at the reply below
Improved the Yucon introduction and API pages to make terminology more clear, give a better description of the framework, etc.
Additionally, you can also see the upcoming API changes to the framework on the API page, so take a peek if you got a moment
I really appreciate you clearing up the API I understand more of it now but I still can’t get Remotes to work idk why I am having such a hard time understanding this. I understand Remotes and all that, this framework is just killing me do you think you could write an example? Sorry for bothering so much
Sure! First though, how are you currently doing it?
function PartClient:Start()
local Part = Instance.new("Part")
Part.Name = "Test"
Part.Position = Vector3.new(0,10,0)
Part.Parent = game.Workspace
Part:Clone()
local Server = self:FireServer("Spawn", Part)
end
function PartServer:Start()
local listen = self:ListenToServerEvent("Spawn")
end
function PartClient:Start()
local Part = Instance.new("Part")
Part.Name = "Test"
Part.Position = Vector3.new(0,10,0)
Part.Parent = game.Workspace
Part:Clone()
self:FireServer("Spawn", Part)
end
function PartServer:Start()
self:ListenToServerEvent("Spawn", function(listen)
-- listen is equal to the passed value
end)
end
So basically doesn’t work the same as a normal Event like usually you would FireServer on the client and then in the ServerScript you would just have OnServerEvent then spawn your part that way. But in this you are firing from the client then passing a Value to the server?
Nope, they work like normal remote events.
May I ask, is this something like the Knit framework, that also runs everything modular with one server and one client script?
Yes, it’s similar in that way
How would I use this framework for an FPS game? Is there any tutorials I can follow along besides polyhall’s that are straightforward to fps game? This would really help, thanks!
I feel like this would introduce a security issue. I’ve only read the post and haven’t delved into the code yet, but wouldn’t this mean the client would be able to call server functions in a server-sided context?
Yes. It’s the creator’s responsibility to not use it for sensitive cases.
I noticed that by removing Script:Step()
or LocalScript:Render()
It would give me error ,I don’t have much experience with this yet
but I still think that you should make it optional
Is there going to be a FPS tutorial anytime soon like PolyHalls? I’ve been waiting for months
I use this framework on daily basis, although I believe plugins and classes should have the Preload and Start method as default.
HUGE UPDATE
New Anti-Exploit Measure
Remote events now use Advanced Encryption Standard type encryption as a way to further protect the boundary between the client and server.
This means that Yucon now comes with pre-made data sets that are extremely specific and extremely tough to crack.
This is the same encryption that governments, banks, and high-end applications use to protect their data.
New API Methods
[void] self:ListenToFramework(String eventName, Function bindedFunction)
This is a replication of the BindableEvent
object for Roblox. In other words, this acts a remote between scripts of the same parent.
For example, firing this on the client will also cause the client to hear it, but the server will not hear it.
self:ListenToFramework("ShowUI", function(UiName, ...)
PlayerGuiList[UiName].Visible = true
end)
[void] self:DisconnectFromFramework(String eventName)
To connect to the framework event, you use ListenToFramework
. As such, you can stop listening by using the counter: self:DisconnectFromFramework()
[Instance] self:GetSharedAsset(String assetName, Boolean? recurseSearch)
Gets an instance stored in the ASSETS
folder in ReplicatedStorage
, or nil if it does not exist.
If recurseSearch
is set to true
, then the search will continue until the instance is not nil
.
[void] self:FireScripts(String eventName, ...)
This provokes any connections that have binded to the framework event of the specified name.
The below code fires the code example from self:ListenToFramework()
:
self:FireScripts("ShowUI", "MainGui")
[void] self:Warn(...)
A more descriptive version of Luau’s built in warn
method.
[void] {SERVER-ONLY} self:ListenToServerClose(Function bindedFunction)
When the server closes (such as when all players leave, when it shuts down, migrates an update, etc.), the function bindedFunction
will be called.
self:ListenToServerClose(function()
print("Oh no, the server is closing!")
end)
[Instance] {SERVER-ONLY} self:GetAsset(String assetName, Boolean? recurseSearch)
Gets an instance stored in the ASSETS
folder in ServerStorage
, or nil if it does not exist.
If recurseSearch
is set to true
, then the search will continue until the instance is not nil
.
[void] self:GetGui(String GuiName, Boolean? recurseSearcj, number?)
Retrieve a ScreenGui
under PlayerGui
, by it’s name, with the options to yeild, until a Gui has loaded.
Shoutout to the contributor!
This update would not be possible without @StyledDev contributing his absolutely magical knowledge of cybersecurity and encryption, so give a super huge round of applause to thank his massive contribution to the framework!