Hello fellow developers!
This is my first ever post on devforum and I’m very nervous about posting it. Anyways, I got bored yesterday and decided to make a lightning-thunder module. Just wanted to share it with you guys. It’s probably not well done since I made in 2 days but let me know what you think about it
If you have any ideas on how to make it better, I would really appreciate it if you tell me!
How the module works:
So the module takes two parts and creates attachments between them depending on how much attachments you want. The attachments are then connected with eachother by RopeConstraint for the visual effect
Once that’s done, I simply change the attachments position over and over so it give the lightning effect.
Gifs:
https://gyazo.com/d16c44a5668be36d1c7f0a42bf48273f
https://gyazo.com/8657e5e18530035efc38c689d87fbdf9
Module methods
Module.Create(): Creates a new “Lightning”.
".Create" takes those params:
StartPart: BasePart with attachment, EndPart: BasePart with attachment , SequenceNumber: number, DoDmg: boolean, TimeOut: time before it deletes it self (-1) if no, ExceptionList: table containing damage blacklist
Lightning:Begin(): Starts the visual effects.
Lightning:Yield(): Pauses the visual effects.
Lightning:Resume() Continues the visual effects.
Lightning:Destroy(): Destroys the “lightning”.
Simple example:
local NewLightning = module.Create(workspace.Start, workspace.End, 25, true, 30, {Character})
NewLightning:Begin()
wait(5)
NewLightning:Yield()
wait(2)
NewLightning:Resume()
wait(3)
NewLightning:Destroy()
Again, this is my first time posting lol, hope you all like it and if you have any suggestions on how to make it better, don’t hesitate to tell me!
Free model here:
That’s it!