Pretty much the title, if so how?
An example is
-- Server:
function hey()
print("hi")
end
I need that to replicate onto every client, not the server, and the client can’t have the source code.
Anyone got ideas? Thanks in advance!
Pretty much the title, if so how?
An example is
-- Server:
function hey()
print("hi")
end
I need that to replicate onto every client, not the server, and the client can’t have the source code.
Anyone got ideas? Thanks in advance!
Use RemoteEvents or functions.
so let’s add a RemoteEvent in ReplicatedStorage.
This is in ServerScriptService:
local stuff = --Just locate your things
function hey()
RemoteEvent:FireAllClients()--This fires on every Client, if you want to do one client just do :FireClient()
local script: let’s just say a GUI is visible
--Identify your things
RemoteEvent.OnClientEvent:Connect(function()
Hey.Visible = false
end)
Functions do not replicate through the server-client boundary. If by “source code” you don’t also mean bytecode, you could compile the function’s source and pass it onto the client to execute with an interpreter such as FiOne.