How would I use the new spatial query API to add health to a players humanoid?
local Part = --PathToYourPart
local Players = game:GetService("Players")
local parts = workspace:GetPartBoundsInBox(Part.CFrame, Part.Size)
for i , part in pairs(parts) do
local model = part:FindFirstAncestorOfClass("Model")
local player = Players:GetPlayerFromCharacter(model)
if model and player then
--get player's character and add health to humanoid
end
end