I want to make a projectile attack. I’ve gotten the projectile down but I already have a hitbox system that I wouldn’t know how to get working with it, and I was wondering if I could get help.
Fireball Script:
local RPS = game:WaitForChild("ReplicatedStorage")
local skillFolder = RPS:WaitForChild("SkillRemotes")
local Remote = skillFolder:WaitForChild("BurningAttackRemote")
local skillStuff = RPS:WaitForChild("SkillStuffs")
Remote.OnServerEvent:Connect(function(player)
local Character = player.Character
local RootPart = Character.HumanoidRootPart
local folder = workspace:FindFirstChild("DebrisFolder") or Instance.new("Folder",workspace)
local Position = Instance.new("BodyVelocity",RootPart)
Position.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
Position.P = 300
Position.Velocity = RootPart.CFrame.LookVector * .1
game.Debris:AddItem(Position,1)
local Track1 = Instance.new("Animation")
Track1.AnimationId = "rbxassetid://17310237542"
local Anim = Character.Humanoid:LoadAnimation(Track1)
Anim:Play()
wait(0.3)
if RootPart then
local fireball = skillStuff:WaitForChild("BurningAttackFireball"):Clone()
fireball.CFrame = RootPart.CFrame * CFrame.new(0, 0.5, -1)
fireball.Parent = workspace
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bodyVelocity.Velocity = RootPart.CFrame.LookVector * 100
bodyVelocity.Parent = fireball
end
local Track2 = Instance.new("Animation")
Track2.AnimationId = "rbxassetid://17311045030"
local Anim = Character.Humanoid:LoadAnimation(Track2)
Anim:Play()
end)