|
| 09 Aug 2014 04:46 AM |
I'm trying to get it so that when the part increases in size, it doesn't move up because of objects being around it. Can anyone help?
Grow = true
function Size(Part) if Grow == true then Grow = false game.Debris:AddItem(script.Parent, 5) script.Parent.Anchored = true for i = 1,50 do wait(0.1) script.Parent.Size = script.Parent.Size + Vector3.new(0.5, 0.5, 0.5) end end end
script.Parent.Touched:connect(Size) |
|
|
| Report Abuse |
|
|
DEVMAC101
|
  |
| Joined: 01 May 2013 |
| Total Posts: 856 |
|
|
| 09 Aug 2014 04:58 AM |
| Turn off the 'CanCollide' Property to false. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2014 05:01 AM |
It already is. If it helps, the part is a Ball not a Brick :P |
|
|
| Report Abuse |
|
|
DEVMAC101
|
  |
| Joined: 01 May 2013 |
| Total Posts: 856 |
|
|
| 09 Aug 2014 05:02 AM |
| By Moves up, you mean the Sphere increases along the Y axis? |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2014 05:05 AM |
It's kind of hard to explain. I made it so when it hits a object, it starts to expand. It ends up moving up if it's touching a object though. |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 09 Aug 2014 05:14 AM |
So you want the ball to expand, while staying in place, fifty times?
local Grow = true local Save = script.Parent.CFrame.p
function Size(Part) if Grow then Grow = false for i = 1, 50 do script.Parent.Size = script.Parent.Size + Vector3.new(i, i, i) script.Parent.CFrame = CFrame.new(Save) wait(0.1) end game.Debris:AddItem(script.Parent, 5) end end
script.Parent.Touched:connect(Size) |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2014 06:03 AM |
It didn't work how I wanted it to work, but with some tweaking I got it to work out fine. Thanks for the help guys :P
local Grow = true
function Size(Part) local Save = script.Parent.CFrame.p if Grow == true then Grow = false script.Parent.Anchored = true game.Debris:AddItem(script.Parent, 2.5) wait(1) for i = 1, 50 do wait(0.05) script.Parent.Size = script.Parent.Size + Vector3.new(1, 1, 1) script.Parent.Transparency = script.Parent.Transparency + 0.01 script.Parent.CFrame = CFrame.new(Save) end end end
script.Parent.Touched:connect(Size) |
|
|
| Report Abuse |
|
|