red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 09:45 PM |
I created a script where a sphere continually expands outwards right above the base plate, but since the sphere cannot enter the base plate, the sphere has to move its position upwards.
To try and fix this i set the position of the sphere with a while true do so that it would continually be placed in a position instead of move, but it still didn't work.
Ex: O - Sphere __ -Base Plate(Imagine the sphere on top)
What I want:
-O- -Sphere within Base Plate while expanding. |
|
|
| Report Abuse |
|
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 09:48 PM |
| *How would i fix this so it goes through the baseplate? |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
| |
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 09:50 PM |
Yeah but what would the script say so that it doesn't move while expanding? (the sphere is anchored) |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 27 Jul 2013 09:54 PM |
| No what is the script you created? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 27 Jul 2013 09:55 PM |
| You have to set its CFrame. Position checks for collisions |
|
|
| Report Abuse |
|
|
| |
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
| |
|
|
| 27 Jul 2013 10:23 PM |
local Origin = part.CFrame part.Size = part.Size + Vector3.new(1,1,1) part.CFrame = Origin |
|
|
| Report Abuse |
|
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 10:25 PM |
Oh here's my script
y = game.Lighting.Explosion:Clone() y.Parent = Workspace while true do y.Position = Vector3.new(1,1,1) for i = 1,250, 3 do s= wait() y.Size = Vector3.new(i+s,i+s,i+s) end wait(3) y:remove() wait() end end |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 27 Jul 2013 10:28 PM |
y = game.Lighting.Explosion:Clone() y.Parent = Workspace while true do y.CFrame = CFrame.new(1,1,1) for i = 1,250, 3 do s= wait() y.Size = Vector3.new(i+s,i+s,i+s) end wait(3) y:remove() wait() end end |
|
|
| Report Abuse |
|
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 10:29 PM |
I replaced what u said for the y.Position = Vector3.new(1,1,1) so it looked like this:
y = game.Lighting.Explosion:Clone() y.Parent = Workspace while true do local Origin = y.CFrame y.Size = y.Size + Vector3.new(1,1,1) y.CFrame = Origin for i = 1,250, 3 do s= wait() y.Size = Vector3.new(i+s,i+s,i+s) end wait(3) y:remove() wait() end end
After testing it still moved. Did I write something wrong? |
|
|
| Report Abuse |
|
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 10:30 PM |
| yours didn't work either hibob :/ |
|
|
| Report Abuse |
|
|
|
| 27 Jul 2013 10:32 PM |
1,250,3?
you already stated that its getting bigger on line 5
then you have a for loop messing with a the size again?
y = game.Lighting.Explosion:Clone() y.Parent = Workspace while true do local Origin = y.CFrame y.Size = y.Size + Vector3.new(1,1,1) y.CFrame = Origin for i = 1,250, 3 do
s= wait() y.Size = Vector3.new(i+s,i+s,i+s) y.CFrame=Origin end wait(3) y:Destroy()--dont use remove u skids wait() end end
|
|
|
| Report Abuse |
|
|
red150
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 15 |
|
|
| 27 Jul 2013 10:35 PM |
| Zomg it works telemonthe1st! :D ty |
|
|
| Report Abuse |
|
|
|
| 27 Jul 2013 10:38 PM |
red i hate to break it to you but
im one of the few reliable people on SH forum
everyone else is skids trying to look good |
|
|
| Report Abuse |
|
|