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..
repeat wait() until game.Players.LocalPlayer
local Player = game.Players.LocalPlayer
local Char = Player.Character
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.
local Flare = Instance.new("Part")
Flare.Parent = game.Workspace
easy,right?
Well,in order to make it move,we will have to give it some velocity,so..
local BV = Instance.new("BodyVelocity")
BV.Parent = Flare
BV.Velocity = Mouse.Hit.lookVector * 60
BV.MaxForce = Vector3.new(1e8,1e8,1e8)
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.
local Particle = script.Parent.Folder
Particle.Parent = Flare
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.
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
for i = 0,32 do
Mesh.Scale = Mesh.Scale + Vector3.new(1,1,1)
wait()
end
Learning evens is also helpful,for example..
Mouse.KeyDown:connect(function(key)
if key == "q" then
end
end)
This will help making the keys for the moves.
I really hope this helped.
5 comments
WOW! Thank you so much for this! I can't believe that you gave me this much help! I will definitely keep practicing, only think I need to study in this answer is the Velocity, Maxforce, etc, but tysm for ur time!
Np
UPDATE: KeyDown/KeyUp is Deceprated (or however you spell) so you shouldn't use it anymore
what do you mean you are bad at scripting, you saved my life, or at least my game
ok :v