Looking inside the âLightningBoltâ Module, There is a small tip saying:
--Small tip: You don't need to use actual Roblox Attachments below. You can also create "fake" ones as follows:
--[[
local A1, A2 = {}, {}
A1.WorldPosition, A1.WorldAxis = chosenPos1, chosenAxis1
A2.WorldPosition, A2.WorldAxis = chosenPos2, chosenAxis2
local NewBolt = LightningBolt.new(A1, A2, 40)
--]]
In my opinion, this isnât properly explained, because when i tried this out, it came as a error saying:
âReplicatedStorage.LightningBolt:88: attempt to perform arithmetic (mul) on nil and numberâ
This is my code:
local LightningBolt = require(game.ReplicatedStorage.LightningBolt)
local LightningSparks = require(game.ReplicatedStorage.LightningBolt.LightningSparks)
local LightningExplosion = require(game.ReplicatedStorage.LightningBolt.LightningExplosion)
local A0,A1 = {},{}
A0.WorldPosition,A0.WorldAxis = Vector3.new(0,0,0),Vector3.new(1,0,0)
A0.WorldPosition,A0.WorldAxis = Vector3.new(0,50,0),Vector3.new(1,0,0)
local NewBolt = LightningBolt.new(A0, A1, 40)
NewBolt.CurveSize0, NewBolt.CurveSize1 = 10, 15
NewBolt.PulseSpeed = 2
NewBolt.PulseLength = 0.5
NewBolt.FadeLength = 0.25
NewBolt.MaxRadius = 1
NewBolt.Color = Color3.new(0.745098, 0.980392, 1)
local NewSparks = LightningSparks.new(NewBolt)