Including lua file (Clientside)


I’ve recently being experienced weird issues with including files clientside (on a dedicated server).
I’m pretty sure it’s just me that do it wrong so I’m in need of assistance.

To the problem:

The file I want included is called thing.lua. It’s placed in addons/testaddon/lua/content/
In addons/testaddon/lua/autorun/client/ I have a file called includefile.lua (I know the names don’t really matter).

Inside this file I will include the thing.lua file to run it. I’ve attempted to do this several ways:

– First method

– Second method

– Also tried to delay it a bit
timer.Simple(5, function() include(“content/thing.lua”) end)

No matter how I do it I get:
Couldn’t include file ‘content/thing.lua(or the other method path)’ (File not found) […]

Windows Dedicated Server


You need a addCSLuaFile for them to get it. Add it in server autorun lua foldee

Yea, I just thought of that as well.
Thank you for the confirmation!