Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the fireball move faster?

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

0

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

1 answer

At this part:

local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) -- this sets the MAX speed of the fireball
BodyVelocity.Velocity = Mouse.lookVector -- this sets the speed of the fireball
BodyVelocity.Parent = FireBallClone

To make it move faster, you need to change "BodyVelocity.Velocity = Mouse.lookVector" for a bigger number, replace Mouse.lookVector with another numbers until you think it's fast enough for you.

1 comment

0

thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.