brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:25 PM |
Here's the script: local p = Instance.new("SpawnLocation") p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.Parent = game.Workspace p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500)))
--Basically i would like a script going inside 'p' part and with a line inside the script saying: script.Parent.BodyPosition.position = script.Parent.Position |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:26 PM |
| I'll offer a prize including RRRRRRRRRR$$$$$ :) |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
| |
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Aug 2013 03:31 PM |
| Just keep the script you want in p in Lighting or something. Then just add this to your script: game.Lighting.pScript:Clone().Parent = p |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 03:31 PM |
local p = Instance.new("SpawnLocation") p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.Parent = game.Workspace p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500))) local b = Instance.new("BodyPosition", p) b.Position = p.Position
--Why not just do that
*Tell me about the rabbits, George* |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:32 PM |
| Thanks for the reply. But I mean I want it to work in script builder, I need a script inside the brick saying that line. Just like a normal model. But a part with a script in it? Help please. |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:33 PM |
| Nice idea but I really need to know how to put a script into the brick and a script inside it. trying to figure out how. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 15 Aug 2013 03:33 PM |
local p = Instance.new("SpawnLocation") p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.Parent = game.Workspace p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500))) local a = game.Lighting.Script:clone --JOLAGAJGPOAJGPOGPJGGJAJG There you read it. a.Parent = p -- Make the script go into the lighting. local b = Instance.new("BodyPosition", p) --If I understood you correctly, this would work. |
|
|
| Report Abuse |
|
|
mrwar117
|
  |
| Joined: 16 Oct 2009 |
| Total Posts: 224 |
|
|
| 15 Aug 2013 03:34 PM |
local p = Instance.new("SpawnLocation") p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.Parent = game.Workspace p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500))) game.Workspace.Script:clone().Parent = p game.Workspace.p.Script.Disabled = false
Then make a seperate script in the workspace thats disabled, and put this inside it : script.Parent.BodyPosition.position = script.Parent.Position
Boom problem solved |
|
|
| Report Abuse |
|
|
mrwar117
|
  |
| Joined: 16 Oct 2009 |
| Total Posts: 224 |
|
|
| 15 Aug 2013 03:36 PM |
| Sorry i replyed too late, Idk ive never played script builder |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:37 PM |
I dunno if you guys understand. I can't clone a script into my brick if I can't get a line into the script. Thanks anyway but you know i'm trying to do this look:
local p = Instance.new("SpawnLocation") p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.Parent = game.Workspace p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500))) function script() SCRIPT HERE end
So it goes inside the brick a script. |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:39 PM |
| Please help. For a example if I wanted to make a button. How would I do it. How can I put a script inside the brick that has a line it? Without cloning anything. so it works in script builder or something? |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:40 PM |
| Cmon guys I've been trying to do it for a long time.. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 03:42 PM |
| So you want to Instance a script and then edit the content with a script. Impossible, sorry. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Aug 2013 03:44 PM |
| The only way you could insert text into the script is with loadstring(script.Code.Value)() but that would mean there would have to be code already in the script. |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 03:45 PM |
| Ok thanks guys solved now. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 03:45 PM |
I suppose you could use Global variables...
*Tell me about the rabbits, George* |
|
|
| Report Abuse |
|
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
| |
|
brt5586
|
  |
| Joined: 09 Jan 2009 |
| Total Posts: 277 |
|
|
| 15 Aug 2013 04:12 PM |
local p = Instance.new("SpawnLocation", game.Workspace) p.BrickColor = BrickColor.new("Bright orange") p.Name = "Wobbly" p.FormFactor = "Plate" p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Size = Vector3.new(18, 0.1, 18) p.Material = "Wood" p.Locked = false p.Anchored = true p.Position = Vector3.new((math.random(-500, 500)),500,(math.random(-500,500))) local b = Instance.new("BodyPosition", p) b.Position = p.Position b.Parent = p b.D = 125000 b.maxForce = Vector3.new(400000, 400000, 400000) b.P = 100000 local bg = Instance.new("BodyGyro", p) bg.Parent = p bg.D = 2 bg.maxTorque = Vector3.new(400000, 0, 400000) bg.P = 1
--BodyGyro Doesn't show up may anyone fix it to work like a wobbling plate in SFOTH |
|
|
| Report Abuse |
|
|