More Fireball Help: Recharge And Explosion (Collide) Assistance?
I got some help yesterday on my fireball script, and turns out I made a few errors. I got help and It was fixed. I would like the fireball be similar to Elemental Battlegrounds' Fireball. Now I'm trying to experiement of how to make a wait function "wait(5)" so you won't be able to spam the spell. It won't work, and I don't know why, and I made an explode model instead of using ROBLOX's default explosion. So I need help. Here's what I have.
01 | local me = game.Players.LocalPlayer |
02 | local tool = script.Parent |
03 | local ws = game:GetService( "Workspace" ) |
05 | tool.Equipped:connect( function (mouse) |
06 | mouse.Button 1 Down:connect( function () |
07 | handle = me.Character:FindFirstChild( "Torso" ) |
09 | handle = me.Character.UpperTorso |
11 | local p = Instance.new( "Part" ) |
12 | p.CFrame = CFrame.new(handle.Position) |
13 | p.TopSurface = "Smooth" |
14 | p.BottomSurface = "Smooth" |
15 | p.Shape = Enum.PartType.Ball |
16 | p.Size = Vector 3. new( 1 , 1 , 1 ) |
18 | p.BrickColor = BrickColor.new( "Really red" ) |
20 | local bv = Instance.new( "BodyVelocity" ) |
22 | bv.velocity = (mouse.Hit.p - handle.Position).unit* 90 |
23 | p.Touched:connect( function (hit) |
24 | if hit.Parent.Name ~ = me.Character.Name then |
25 | hit.Parent.Humanoid:TakeDamage( 5 ) |
28 | game:GetService( "Debris" ):AddItem(p, 7 ) |
Got any tips, ideas or hints?
Thanks for the help.