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: Expanding Brick Without Moving Position

Previous Thread :: Next Thread 
red150 is not online. 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 is not online. 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 is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
27 Jul 2013 09:48 PM
script?
Report Abuse
red150 is not online. 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 is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
27 Jul 2013 09:54 PM
No what is the script you created?
Report Abuse
blocco is not online. 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
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
27 Jul 2013 10:03 PM
^
Report Abuse
red150 is not online. red150
Joined: 26 Oct 2009
Total Posts: 15
27 Jul 2013 10:06 PM
How do I do that? >.<
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
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 is not online. 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 is not online. 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 is not online. 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 is not online. red150
Joined: 26 Oct 2009
Total Posts: 15
27 Jul 2013 10:30 PM
yours didn't work either hibob :/
Report Abuse
TELEMONTHE1st is not online. TELEMONTHE1st
Joined: 11 May 2010
Total Posts: 692
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 is not online. red150
Joined: 26 Oct 2009
Total Posts: 15
27 Jul 2013 10:35 PM
Zomg it works telemonthe1st! :D ty
Report Abuse
TELEMONTHE1st is not online. TELEMONTHE1st
Joined: 11 May 2010
Total Posts: 692
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
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