I want hitbox that detects if part named "Touching part" Touches it when it does it executes code
Here is what i have so far:
local part = script.Parent
local light = script.Parent.Parent.SpotLight
part.Touched:Connect(function(hit)
if hit:FindFirstChild("TouchingPart") then
light.Enabled = false
end
end)

1 comment
Thanks