Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I script lightning to strike a certain point?

I've seen many games using this kinda thing,in lightning weapons as well as natural lightning striking the ground.

Does anyone have any reference links for this or could someone explain how people do this?

1 answer

The best way to do this, would be to use ray casting. An example of using ray casting can be seen here. Eccentially ray casting creates an "invisible" line that you can alter. So when you create this line form that start point to the end, you can change color and material of it to make it look as if i t was lighting. Alternitavley you can use a model and the MoveTo() method to move the model to a vector3 position

This discussion is preserved as it was. New answers, comments, and votes are closed.