.Touched:connect(function(part)
if part:IsDescendantOf(Tool.Parent) then return end
if contains(Knives, part) then return end
local SplashDamage = 150
local Radius = 49.5
local GrenadeArmorFactor = 50
local waitvalue = 1 -- Time to wait each time for dealing damge
local damage = 10 --Damage dealt
local maxdistance = 20 -- Max studs between the part and the characterChildWhichIsA("Humanoid") and
for e,char in pairs(workspace:GetChildren()) do
if char:FindFirstChildWhichIsA(script.Parent.Position - char:WaitForChild("HumanoidRootPart").Position).Magnitude <= maxdistance then
part.Parent:FindFirstChild("Humanoid"):TakeDamage(damage)
print((script.Parent.Position - char:WaitForChild("HumanoidRootPart").Position).Magnitude)
end
end
I don’t understand the part “script.Parent.Position” .you have acquired a location. I will answer if I need more code.