Local Module
local sendRange = script.Parent:WaitForChild('SendRange')
sendRange:FireServer(id , character, character.Humanoid, touch)
print(1)
arrow:Destroy()
print('Destroy')
Server Module
local sendRange = script.Parent:WaitForChild('SendRange')
sendRange.OnServerEvent:Connect(function(player, id , character, humanoid, hit)
print(2)
main:CheckPlayer(player, id , character, humanoid, hit)
end)
It prints 1 and Destroy, but never prints 2. The SendRange Remote is in the same place. Both the scripts and Event are inside a folder inside RepStorage. Both scripts are modules.
The ‘Local Modules’ function is fired by a LocalScript. Then the event is suppose to transfer that from local to server, as the other module is only ever run by the server.
EDIT I belive I found the problem. I was never requiring the other module, so it was never running. But if I require the server module, then it won’t work, as it references the ServerStorage and all that on it. How can I get a LocalModule to still require a Server Module?