-- Reference to ReplicatedStorage and Arrow model local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local player = Players.LocalPlayer local arrowTemplate = ReplicatedStorage:WaitForChild("Arrow") -- Function to create and shoot an arrow local function shootArrow(origin, direction)   local arrow = arrowTemplate:Clone()   arrow.CFrame = CFrame.new(origin, origin + direction)   arrow.Parent = workspace   -- Make the arrow move forward   local speed = 100   local velocity = direction.Unit * speed   local bodyVelocity = Instance.new("BodyVelocity")   bodyVelocity.Velocity = velocity   bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)   bodyVelocity.Parent = arrow   -- Clean up after 5 seconds   game.Debris:AddItem(arrow, 5) end -- Connect to input or shooting event (example with Mouse Button 1) local mouse = player:GetMouse() mouse.Button1Down:Connect(function()   local character = player.Character   if character then     local head = character:FindFirstChild("Head") or character:FindFirstChild("HumanoidRootPart")     if head then       local origin = head.Position       local direction = (mouse.Hit.p - origin).Unit       shootArrow(origin, direction)     end   end end)