How to use resource.AddWorkshop() ?

Hello, I have resource.AddWorkshop( “200318235” ) written in my code, but when people joined my server, they couldn’t see the models. It’s in a serverside lua file, so… am I doing it wrong?
It’s supposed to download this.

(Yes, it does exist. It’s just private.)
Would making it private be a problem?

Looks fine to me; are you also hosting the model on your server using +host_workshop_collection?

No, how would I do that?

You gotta make it public.

yeah ; it’s a shame we don’t have an “unlisted” option.

This pretty much sums it up.


What I do when I use workshop downloads is I make a completely blank lua file. Then put the resource.addworkshop and the addon I desired. In your case it would be resource.AddWorkshop(“200318235”) then save it as whatever you want to call it. But when I put a captial letter in the name it wouldnt work at all. So name it like testwdl.lua and then put that in your lua/autorun and then restart your server and have your friends join and see if that fixes the issue.

It’s supposed to go in lua/autorun/server

Just put +host_workshop_collection 200318235 in your start.bat file next to your +gamemode etc

Browse to your workshop addon in steam and click add to collection, under the media, right of the thumbs up and thumbs down icons. After it is in a collection, browse to that collection of your workshop and use that link id with +host_workshop_collection, which is a command line parameter and should be a part of your sever configuration panel if you use some host besides yourself.