|
| 07 Dec 2013 02:13 PM |
First Question : What is the line of code to change color? i tried LOCALINSTANCEOFBRICK.Color = Vector3.new(255, 255, 255) but that didnt work. can someone please help?
Second Question: When i do: local brick = Instance.new("Part", workspace) brick.Name = "Estro" local script = Instance.new("Script", workspace.Estro)
how can i insert what the script is? what is the line of code for that? do i have to make a base script than that is coped over everytime this is run? please help! |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 07 Dec 2013 02:15 PM |
| .Color = Color3.new(255,255,255) |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:16 PM |
| Thanks! Anyone can help me with question 2? |
|
|
| Report Abuse |
|
|
| |
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 07 Dec 2013 02:20 PM |
| I believe you can't make a script like that and then edit inside of it over the existing one. Maybe possible with loadstring() |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:20 PM |
| Can you insert a script into a block then? |
|
|
| Report Abuse |
|
|
| |
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 07 Dec 2013 02:22 PM |
Yes, you can. It should work the way you did it.
p = Instance.new("Part", Workspace) sc = Instance.new("Script", p) |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 07 Dec 2013 02:22 PM |
| But editing it live from the server is a bit complex and it probably requires using loadstring(). |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:23 PM |
| For your second question there is a hidden property named Source, which controls the text in the script. Unfortunately, this property is protected so you can't access it. However, the function loadstring()() allows you to insert text into a script. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:25 PM |
And if you are trying to change the colour of a TextLabel, or something in a Gui. Divide each number by 255.. text.TextColor3 = Color3.new(255/255,1/255, 255/255) |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:46 PM |
| how would the load string work? |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:59 PM |
Kohls admin method:
Put a string value inside a script.
Change the value of that value to your script.
put this inside the script you might want to clone and edit the script: repeat wait() until script:findFirstChild("Code") loadstring(script.Code.Value)()
Obviously Code being the value. Edit the script as it fits you. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 04:44 PM |
| ok i did that, now how can i edit the script to help me insert it into my new instances? is it a line of code? i want to make it a function in my main script. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 04:57 PM |
rise again Post! *waves dark wand* |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 05:00 PM |
well you could just create a script and put it inside lighting then
game.Lighting.Script:Clone().Parent = workspace.Estro |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
|
| 07 Dec 2013 05:05 PM |
| script.Code.Value = "Paste in your code here!" |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 07 Dec 2013 05:39 PM |
First Question : LOCALINSTANCEOFBRICK.BrickColor.Color = Color3.new(255, 255, 255)--the brick's brickcolor's property of Color is color3, but the brick's BrickColor is actually BrickColor.new("color")
Another way of making the brick white is by doing
LOCALINSTANCEOFBRICK.BrickColor = BrickColor.new("Industrial white")
Second Question: local brick = Instance.new("Part", workspace) brick.Name = "Estro" local script = script.ScriptToCopy:clone() -- Currently, you can't edit a script's source via properties script.Parent = brick |
|
|
| Report Abuse |
|
|