So, I need the ball to stay anchored but update the position and always stay 2 studs in front of the character's torso, but I'm confused as to how to do that. Help me please?
player = game.Players.LocalPlayer
char = game.Players.LocalPlayer.Character
hum = game.Players.LocalPlayer.Character.Humanoid
mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:Connect(function(key)
key = key:lower()
if key == "e" then
local fb = game:GetService("ServerStorage").Fireball:Clone()
game:GetService("Chat"):Chat(char.Head, "Fireball!", "Red")
fb.Parent = game.Workspace
fb.Anchored = true
if char.UpperTorso and char.LowerTorso then fb.CFrame = char.UpperTorso.CFrame + Vector3.new(0, 0, -2)
else
fb.CFrame = char.Torso.CFrame + Vector3.new(0, 0, -2)
end
end
end)
