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 » Scripters
Home Search
 

Re: How could I make this?

Previous Thread :: Next Thread 
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
17 Aug 2016 02:46 PM
So like. When this brick "explodes" I want to spawn several different bricks, but I want it to come out like a circle around the main brick. Then, those bricks travel in the directions they're facing. Idk how to do this though. :/
Report Abuse
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
17 Aug 2016 03:34 PM
Bump
Report Abuse
AxonMega is not online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
17 Aug 2016 03:45 PM
for 1 = 1, math.random(10, 15) do
local part = Instance.new("Part", workspace)
--customize the part here
part.Position = brick.Position
local direction = Vector3.new(math.random(1, 100), math.random(1, 100), math.random(1, 1000)).unit
Instance.new("BodyForce", part).Force = direction*40

--check for typos
Report Abuse
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
17 Aug 2016 03:50 PM
Thanks for the post, but I mean I want to create parts that surround the main part in a circle formation. I remember some tutorial on the wiki about this but I forgot it.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
17 Aug 2016 04:07 PM
that lags, also just draw cframes in angles around it or clone a base explosion model onto it
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
17 Aug 2016 04:13 PM
blarg i do that and it works good

here's the cheap, easy way to do it(i do this with my enemies)

you have an explosion model

you clone it into workspace and position it to the part when it dies

then apply a body force and set its force equal to the lookvector of the part*100 or something

when you make the model rotate the parts to your need


Formerly xXTheRobotXx, add 13,349 posts
Report Abuse
2eggnog is not online. 2eggnog
Joined: 08 Nov 2008
Total Posts: 1351
17 Aug 2016 04:16 PM
local n = 15
for i = 1, n do
local angle = 2*math.pi*i/n
local v = Vector3.new(math.cos(angle),0,math.sin(angle))
local part = Instance.new('Part', workspace)
part.CFrame = CFrame.new(brick.Position, brick.Position + v)
Instance.new("BodyForce", part).Force = v*40
end


Report Abuse
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
17 Aug 2016 04:17 PM
That's kinda cool Narwhal. And thanks blarg, I will try that!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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