How i can replicate a function?

Im using a custom building system for my game but im wondering how i can replicate the spawn objects function from this system, becasue you can’t use custom methods inside functions, how i can replicate this for the clients from the server or to the servers from the client?

Hi! You can just think of a function call as a some sort of data. For example, any function call is some action with some arguments. You can create some sort of alphabet for functions (to code and decode their actions), which is known by client and server and after that just transfer function alphabet letter and arguments of call. By the way some function stacks and client server protocols are working in similar manner.

You have to use events and then replication mode will show in details panel.also only server is allowed to spawn in multiplayers!

But i have all my system organized with functions :confused: Im gonna destroy all of this

You are not going to have an error if you

  1. Remove old function
  2. Add new event with exact same name
  3. Paste old Functions logic to new event .