What you should know is that im trying to create everything in one script
and the shor variant of down below is that im trying to create a script with a script basically but i dont know how to write anything in the script that was created by my first script. Sorry if this is confusing maybe this will help:
`~~~~~~~~~~~~~~~~~
Button = Instance.new ("Part")
Button.BrickColor = BrickColor.new ("White")
Button.Anchored = true
Button.Position = Vector3.new (13.5, 5.5, -9)
Button.Size = Vector3.new (5, 1, 1)
Button.Name = ("Button")
Button.Parent = game.Workspace
ButtonClick = Instance.new ("ClickDetector")
ButtonClick.Parent = game.Workspace.Button
ButtonScript = Instance.new ("Script")
ButtonScript.Parent = game.Workspace.Button
this is the code and as you see i managed to create a script altough i dont know how to make it so there is code in the script because the code has to be in the script when it is created
If you somehow understood me help would be appreciated because i cant find answers on youtube

1 comment
The script's source property holds the code to be executed, but you can't write it nor read it, or an error is gonna happen