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

Loading Asset won't work?

Asked by 10 years ago

I want to make it so when you click on a button, it loads an Asset (in this case a GUI) into the game, but it won't work:

function explorerClick()
loadstring(Game:GetObjects("rbxassetid://157685213")[1].Source)()
end

script.Parent.MouseButton1Down:connect(explorerClick)

1 answer

Log in to vote
0
Answered by
Elttob 15
10 years ago

You cannot use the Source variable of any Script. It is RobloxLocked.

Ad

Answer this question