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.
local me = game.Players.LocalPlayer
local tool = script.Parent
local ws = game:GetService("Workspace")
tool.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
handle = me.Character:FindFirstChild("Torso")
if handle== nil then
handle=me.Character.UpperTorso
end
local p = Instance.new("Part")
p.CFrame = CFrame.new(handle.Position)
p.TopSurface = "Smooth"
p.BottomSurface = "Smooth"
p.Shape = Enum.PartType.Ball
p.Size = Vector3.new(1,1,1)
p.CanCollide = false
p.BrickColor = BrickColor.new("Really red")
p.Parent = ws
local bv = Instance.new("BodyVelocity")
bv.Parent = p
bv.velocity = (mouse.Hit.p - handle.Position).unit*90
p.Touched:connect(function(hit)
if hit.Parent.Name ~= me.Character.Name then
hit.Parent.Humanoid:TakeDamage(5)
end
end)
game:GetService("Debris"):AddItem(p, 7)
end)
end)
Got any tips, ideas or hints? Thanks for the help.

1 comment
It works, but made a new problem, I typed it on my answers, so what the error is, is whenever the ball hits the Baseplate or something without a humanoid, it will not recharge.