So basically this is my first time making a fireball script and I want to know how I can add a line so that it will give this fireball a little force and push it towards where the mouse is facing.
This is my **Local** Script inside of ***StarterPlayerScripts***;
local uis = game:GetService('UserInputService')
local plr = game.Players.LocalPlayer
local characterT = plr.CharacterAdded:Wait():WaitForChild('Torso')
local activated = false
uis.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.X then
print('X')
if activated == false then
print('Activating')
local FB = Instance.new('Part')
FB.Shape = 'Ball'
FB.Size = Vector3.new(1,1,1)
wait(1)
FB.Size = Vector3.new(2,2,2)
FB.Name = 'FireBall'
FB.Anchored = false
FB.CanCollide = true
FB.Material = 'Granite'
FB.BrickColor = BrickColor.new('Really red')
FB.TopSurface = 'Smooth'
FB.BottomSurface = 'Smooth'
FB.Parent = game.Workspace
FB.Position = characterT.Position
end
end
end)
So I'm wondering if I can just use Instance.new to create something but I'm not sure what. Help and feedback are appreciated. Thanks
