Using workshop for dedicated servers?

I added my Authkey and Collection ID to the startup config, I am trying to get my users to download GMOD Tower Playermodels through workshop but it isn’t working.

No, what you’re doing, is making server download those hats, but not clients download that addon
You have to use resource.AddWorkshop

I did that too, I added


resource.AddWorkshop("150404359")

to the first line of my resource.lua in /lua/autorun

I should point out that it was saying it was a Nil value in a lua error.

I am pretty sure your resource.lua should be in /lua/autoruns/server.

The resource.lua should look like



if SERVER then
resource.AddWorkshop("blah321")
end


As above people had said, you should make it only be called on the server, and that lua error it was giving you was on the clients because that function doesnt exist in the clientside realm.