It moves slow idk why
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService('Debris')
local Remote = ReplicatedStorage.FireBallEvent
local FireBall = ReplicatedStorage.FireBall
local Damage = 10
local ServerDebounces = {}
Remote.OnServerEvent:Connect(function(plr, Mouse)
if not ServerDebounces[plr] then
ServerDebounces[plr] = true
local Char = plr.Character or plr.CharacterAdded:Wait()
local FireBallClone = FireBall:Clone()
FireBallClone.CFrame = Char.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
FireBallClone.Parent = workspace
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyVelocity.Velocity = Mouse.lookVector
BodyVelocity.Parent = FireBallClone
spawn(function()
for i = 0, 1000 do
wait()
FireBallClone.Size = FireBallClone.Size + Vector3.new(0.07,0.07,0.07)
BodyVelocity.Velocity = Mouse.lookVector*i
end
end)
ServerDebounces[plr] = false
Debris:AddItem(FireBallClone, 10)
local Debounce = true
FireBallClone.Touched:Connect(function(h)
if h.Parent:FindFirstChild('Humanoid') and h.Parent.Name ~= plr.Name and Debounce then
Debounce = false
local Enemy = h.Parent.Humanoid
Enemy:TakeDamage(Damage)
FireBallClone.Transparency = 1
BodyVelocity:Destroy()
FireBallClone.Effect.Speed = NumberRange.new(8,8)
wait(1)
FireBallClone.Effect.Enabled = false
wait(1)
FireBallClone:Destroy()
wait(3)
Debounce = true
end
end)
end
end)

1 comment
Accept my answer so people know this question has been answered.