i tried to fix this its like when u click a block it gives u a random number i tried for 2 hours trying to fix this but couldnt
script.Parent.ClickDetector.MouseClick:Connect(function(click) local imrandom = math.random(1,12) print(imrandom) function kil(player) if imrandom == 1 then local human = player.Character.Humanoid human.health = 0 end end end)
and i inserted a click detector too
also just realised i lost the other code
Here's a fixed version of your code. You have some deprecated practices like the use of health which is supposed to be Health. And a random function that is not needed.
Fixed Script
script.Parent.ClickDetector.MouseClick:Connect(function(click) local imrandom = math.random(1,12) print(imrandom) if imrandom == 1 then local human = click.Character.Humanoid human.Health = 0 end end)