local ReplicatedStorage = game:GetService("ReplicatedStorage") local ShootEvent = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("ShootProjectileRemoteEvent") local mobsFolder = workspace:WaitForChild("Mobs"):WaitForChild("MobCamp") local function shootAtTarget(target) if not target:IsA("BasePart") then return end local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait() local root = char:WaitForChild("HumanoidRootPart") local origin = root.Position local direction = (target.Position - origin).Unit local args = { target, origin, direction } ShootEvent:FireServer(unpack(args)) end for _, mobModel in ipairs(mobsFolder:GetDescendants()) do if mobModel:IsA("Model") then local dragon = mobModel:FindFirstChild("Dragon") or mobModel:FindFirstChild("Root") if dragon and dragon:IsA("BasePart") then shootAtTarget(dragon) end end end