#Help Making Replication System

7 messages · Page 1 of 1 (latest)

heavy wyvern
#

I'm making movesets for a game and one thing I always have troubles with is making a replication system for effects, my plan was to have 2 modules with the same function names. One will be for the effects itself and one will be for the server logic. Would this work or is there a better way to handle this?

Here is an example:

--MODULE 1

local Effects = {}

function Effects.Move1()
  --... Effects will display here
end

return Effects

--MODULE 2
local Moveset = {}

function Moveset.Move1()
  --... Move logic goes here
end

return Moveset
tawdry junco
#

thats how i do it except i use only one module

i did have a idea where:

you use one function and in that function you check if its running on the client or server using runservice:IsServer and if so run server code

if not run client code

heavy wyvern
#

That actually could work

tawdry junco
#

it may or may not work 🤷‍♂️ havent tried

heavy wyvern
#

How would I be able to replicate module movesets with a remote event? Can I put my modules in replicated storage or will that cause some security issue?

tawdry junco
#

should be fine in replicated storage

lavish lionBOT
#

studio** You are now Level 16! **studio