I have issue with lightning beam script

Did you implement the lightning bolts into the script somehow?

I am trying to make it worked but it keep spamming error that said attempt to index nil with WorldPosition
“18:39:17.623 ServerScriptService.EditedForceServer.LightningBoltLeft:88: attempt to index nil with ‘WorldPosition’ - Server - LightningBoltLeft:88”

Are you using attachments for the lightning?

I just did checked everything but it not show any parts for the lightning bolts it not in terrain.

Change the parent of the lightning bolt part to Terrain.

Okay let me try that but the lightning bolt part suppose to be follow on player hands.

If you are using attachments, it should be attached to your characters hands, and the parts should be stored in terrain or a folder. Not camera

If this doesn’t work out can you show me where the problem in the script is?

It doesn’t work out and for problem in the script is in 88 lines

	local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*self.CurveSize0, a1.WorldPosition - a1.WorldAxis*self.CurveSize1, a1.WorldPosition

Is the attachment properly connected to your characters hand? And also connected to the victim?

Yes the attachments called LeftH and RightH for force lightning caster both hands and for victim it have attachment (inside victim humanoidrootpart) called AttachmentZap (will change this attachment name once I resolved the lightning bolt issue.)

were is the lightning located in the studio? and also is it being cloned into use?

Did you forget to rename a variable or accidentally misspelled it?

I’m not sure but I don’t know where is variable in it

Huh. Can you send me the script?

Want me to add you to my game TC for look inside the script or want me to send you the entire script?

the error means that whatever p0,1,2,3 and/or 4 is non-existant.

Can you search for those parts when you run the game?

Oh it not show any parts in test mode or play mode since it keep spam said this same error whenever I use on other player.
“18:39:17.623 ServerScriptService.EditedForceServer.LightningBoltLeft:88: attempt to index nil with ‘WorldPosition’ - Server - LightningBoltLeft:88”

are these already-made? or are they created with instance.new? also make sure they don’t spawn below the baseplate and fall to the void, deleting them

also make sure that their CanCollide is turned on, if not then they will fall through the map.

if you want to keep CanCollide Off then i reccomend putting the lightning parts in Replicated Storage

I’m using this module [Effect] v1.1 Lightning Beams: Seamless, smooth and procedurally animated with beam-like properties