I have tried making something but it doesn't seem to be working, here is my script in the lazer:
function onTouch(part)
if script.Parent.Transparency == 0 then
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
end
end
end
while true do
script.Parent.Transparency = script.Parent.Transparency + 0.5
wait(0.5)
script.Parent.Transparency = script.Parent.Transparency + 0.5
wait(1)
script.Parent.Transparency = 0
wait(1.5)
end
script.Parent.Touched:Connect(onTouch)

3 comments
Try printing.
yeah I've tried and it printed everywhere but the script still doesn't work
move your "script.Parent.Touched:Connect(onTouch)" above your "while true do"