i want to write a script for a localscript that is created in a script but i dont know how
here is the code:
local starterui = game:GetService("StarterGui")
local sg = Instance.new("ScreenGui", starterui)
local fr = Instance.new("Frame",sg)
local il = Instance.new("ImageLabel", fr)
local ls = Instance.new("LocalScript", il)
--write code here for the local script
if you can help that would help me alot since i have to use this through out my whole game and it would be better if you can help me optimize the script above since it looks kinda messy and long. thanks!
Do you mean to insert code in an empty LocalScript? All script types have a .Source property, which is not writeable nor readable. You cannot insert code to blank scripts without a plugin (which is only usable in Studio).