local ManaNeeded = 100 --Change these values around
local vec = Vector3.new(mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z)
if gui.Mana.Value >= ManaNeeded then
if not firedb then
firedb = true
gui.Mana.Value = gui.Mana.Value - ManaNeeded
local fb = p.Parts.Fireball:Clone()
fb.Position = plr.Character.PrimaryPart.Position + ((vec - plr.Character.Head.Position).unit * 5)
fb.Velocity = (vec - plr.Character.Head.Position).unit*200
fb.Name = (plr.Name..'Fireball')
fb.Parent = plr.Character
fb.Script.Disabled = false
fb.Position = plr.Character.PrimaryPart.Position
wait(5)
firedb = false
end
return true
else
return false
end
end,
i just need to know where to insert an animation in here cause I want the animation to play when you fire

1 comment
you can do "local vec = mouse.Hit.p", easier to write