I'm trying to make a fireball move towards my mouse instead of straight forward from my body. I'm not really sure what commands or CFrames to use to make it do that. Heres the entire script so far.
Player = game.Players.LocalPlayer Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key) key=key:lower() if key == "q" then local x=Instance.new("Part", workspace) x.Shape = "Ball" x.BrickColor = BrickColor.new("Really red") x.Transparency = 0.5 x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.CanCollide = false x.Anchored = false x.CFrame = Player.Character.Head.CFrame * CFrame.new(0,0,-12) local v = Instance.new("BodyVelocity", x) v.Velocity = Player.Character.Head.CFrame.lookVector * 90
v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
local f = Instance.new("Fire")
f.Size = 10
f.Parent = x
local S = script["Damage"]:clone() S.Parent = x x.Parent= workspace wait(2)
x:remove()
end
end)

1 comment
remove() is deprecated, connect is deprecated , keydown is deprecated