Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I made a fireball script but the "Fireball" won't move?

Asked by
epicnt 13
4 years ago

I'm trying to make this fireball move but it's not working! This is what I wrote.

local UIS = game:GetService("UserInputService")
local RS = game:GetService("ReplicatedStorage")
local RE = RS.SimpleFireBall

RE.onServerEvent:Connect(function(player)
    local fireBall = Instance.new("Part", workspace)
    fireBall.Anchored = true
    fireBall.Size = Vector3.new(2,2,2)
    fireBall.Shape = "Block"
    local actualFireBall = Instance.new("Part", workspace)
    fireBall.Anchored = true
    fireBall.Size = Vector3.new(2,2,2)
    fireBall.Shape = "Block"
    local plr = player
    local char = plr.Character
    local hum = char.Humanoid
    fireBall.Orientation = char:WaitForChild("Right Arm").Orientation
    fireBall.CFrame = char:WaitForChild("Right Arm").CFrame * CFrame.new(-2,1,-5)
    local Vitesse = Instance.new("BodyVelocity", fireBall)
    Vitesse.Velocity = Vector3.new(0,0,10)
    wait(2)
    fireBall:Destroy()
end)

Please help.

0
btw I forgot to change the 11th, 12th and 13th lines to match the the variable "actualFireBall" epicnt 13 — 4y
0
If you want the fireball to move in the direction the player is moving, you could use RayCast or CFrame.LookVector? killerbrenden 1537 — 4y
0
I'll try. epicnt 13 — 4y

Answer this question