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: lightning script

Previous Thread :: Next Thread 
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 09:50 AM
okay, if you run this in studio it looks like a messy version of lightning, all that's missing is the parts connecting on top of each other, how can I do that?

for i = 1,25 do
local a = Instance.new("Part",game.Workspace)
a.Anchored = true
a.Rotation = Vector3.new(math.random(-50,50))
a.FormFactor = "Custom"
a.Size = Vector3.new(0.2,5,0.2)
a.Position = a.Position + Vector3.new(a.Size.Y/2)
a.BrickColor = BrickColor.Yellow()
a.Material = "Neon"
a.Parent = game.Workspace
wait()
end
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 11:18 AM
bump
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 12:29 PM
bump
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 03:49 PM
bump
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 04:42 PM
bump
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
26 Nov 2015 04:43 PM
Wow that actually makes pretty good lightning
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
26 Nov 2015 08:13 PM
Bump
Report Abuse
bigboy77584 is not online. bigboy77584
Joined: 06 Jan 2009
Total Posts: 1003
26 Nov 2015 08:56 PM
I dont know what you mean


And that's all I have to say about that. -Forrest Gump
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
27 Nov 2015 08:08 AM
Bump
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
27 Nov 2015 08:53 AM
okay, for a better explanation: if you put the script above in your game, look at the lightning, notice how the parts don't connect?
How do we make it connect?
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
27 Nov 2015 07:51 PM
bump
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
27 Nov 2015 08:00 PM
On mine they connect...
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
27 Nov 2015 09:00 PM
no, I mean the very top surface of the parts touch. mine's don't.

like I want it like this:

/
\
/
|
\

but mine is like this:

/
/
\
/
/
\
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Nov 2015 09:05 PM
Take a look at the "Tesla Coil" stamper part, it has a script for that.
Report Abuse
Phenite is not online. Phenite
Joined: 16 May 2010
Total Posts: 158
27 Nov 2015 10:18 PM
I've made a successful lightning generator that uses 2 Vector3 positions.
Some things you might want to use:
CFrame.new(v1,v2) v1 and v2 are both Vector3 values. This command creates a CFrame of v1 pointing at v2.
So, if you do the average of v1 and v2, you get:
CFrame.new(.5*(v1+v2),v2)
And then, for the length of the line, do:
(v1-v2).magnitude
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