Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to load an asset with an assetid?

Asked by
Miniller 562 Moderation Voter
5 years ago

So my question is: How can I load something when I just have an asset id? E.g 123 - let's say this is a night sky's asset id, how can I load it to game.Lighting?

I already tried game:GetService("InsertService"):LoadAsset(123).Parent = game:GetService("Lighting") (I wrote the real asset id instead of 123 (and I found that background in ToolBox)) but I got an error: HTTP 403

Thanks!

0
"HTTP 403 is a standard HTTP status code communicated to clients by an HTTP server to indicate that access to the requested (valid) URL by the client is Forbidden for some reason. The server understood the request, but will not fulfill it due to client related issues. There are a number of sub-status error codes that provide a more specific reason for responding with the 403 status code."  User#24403 69 — 5y
0
But I still don't understand why I got that error. Studio have access to API services, game is published.. Miniller 562 — 5y

Answer this question