Hello
Im not really that good at scripting but i hope this helps.
The first things are variables,pretty much texts that store some type of value,for this script we might need to make some variables..
1 | repeat wait() until game.Players.LocalPlayer |
2 | local Player = game.Players.LocalPlayer |
3 | local Char = Player.Character |
4 | local Mouse = Player:GetMouse() |
So i guess your making a magic,right?
well,if you are going to make a projectile,you will need to know how to create a part.
1 | local Flare = Instance.new( "Part" ) |
2 | Flare.Parent = game.Workspace |
easy,right?
Well,in order to make it move,we will have to give it some velocity,so..
1 | local BV = Instance.new( "BodyVelocity" ) |
3 | BV.Velocity = Mouse.Hit.lookVector * 60 |
4 | BV.MaxForce = Vector 3. new( 1 e 8 , 1 e 8 , 1 e 8 ) |
And,to finish it off you might need to add some projectiles to the flare,so you can simply put some in a folder,clone them,and put them in the flare.
1 | local Particle = script.Parent.Folder |
so,that should get you started.
Variables are important
Learning functions to make things shorter is also helpful.
Learning loops can be useful for making explosions,by resizing a Sphere mesh,for example.
1 | local Mesh = Instance.new( "SpecialMesh" ) |
2 | Mesh.MeshType = "Sphere" |
5 | Mesh.Scale = Mesh.Scale + Vector 3. new( 1 , 1 , 1 ) |
Learning evens is also helpful,for example..
1 | Mouse.KeyDown:connect( function (key) |
This will help making the keys for the moves.
I really hope this helped.