Activate Button With Other Parts

Hello, so I wanted to do something that if a part like a ball or something hits a diffrent part its gonna be activated but what I have right now is just the part getting activated by the player
–Video–


–script right now–

local part = script.Parent

local pointLight = Instance.new("PointLight", part)
pointLight.Brightness = 0
pointLight.Range = 12
pointLight.Color = Color3.fromRGB(85, 255, 0)

local touchNo = 0
local function blink()
	touchNo = touchNo + 1
	local myTouchNo = touchNo
	for i = 1, 0, -.1 do
		if touchNo ~= myTouchNo then break end
		part.Reflectance = i
		pointLight.Brightness = i * 2
		script.Parent.Color = Color3.fromRGB(85, 255, 0)
		script.Parent.Checkpoint:Play()
		script.Enabled = false
	end
end

part.Touched:Connect(blink)

would be cool if you can help me!

w h a t

part.Touched:Connect(hit)
   if hit.Name == "NameofPartItWantsToBeHitBy" then
      --do ur own thing here
   end
end)
1 Like