generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Size/Position problem

Previous Thread :: Next Thread 
geckohero17 is not online. geckohero17
Joined: 27 Dec 2009
Total Posts: 1342
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 is not online. DEVMAC101
Joined: 01 May 2013
Total Posts: 856
09 Aug 2014 04:58 AM
Turn off the 'CanCollide' Property to false.
Report Abuse
geckohero17 is not online. geckohero17
Joined: 27 Dec 2009
Total Posts: 1342
09 Aug 2014 05:01 AM
It already is.
If it helps, the part is a Ball not a Brick :P
Report Abuse
DEVMAC101 is not online. 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
geckohero17 is not online. geckohero17
Joined: 27 Dec 2009
Total Posts: 1342
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 is not online. 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
geckohero17 is not online. geckohero17
Joined: 27 Dec 2009
Total Posts: 1342
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image