so apparently math.random() does not work above the number 2. Here is my script:
script.Parent.ClickDetector.MouseClick:Connect(function(henlo)
script.Parent.Sound:Play()
for i = 0, 1, 0.09 do
wait(i/50)
script.Parent.CFrame = script.Parent.CFrame:Lerp(script.Parent.Parent.Button1.CFrame, i)
end
local e = math.random(1, 10)
if e == 1 then
print("Method: GET CRUSHED BY A WEIGHTED COMPANION CUBE")
workspace.CompCube.Anchored = false
end
if e == 2 then
print("Method: GET CRUSHED BY A HEAVY DUTY CRUSHER")
workspace.crosher:Play()
for z = 0, 1, 0.1 do
wait(z/50)
workspace.Crusher.CFrame = workspace.Crusher.CFrame:Lerp(workspace.Crusher.Crusher1.CFrame, z)
end
if e == 3 then
workspace:ClearAllChildren()
end
if e == 4 then
workspace:ClearAllChildren()
end
if e == 5 then
workspace:ClearAllChildren()
end
if e == 6 then
workspace:ClearAllChildren()
end
if e == 7 then
workspace:ClearAllChildren()
end
if e == 8 then
workspace:ClearAllChildren()
end
if e == 9 then
workspace:ClearAllChildren()
end
if e == 10 then
workspace:ClearAllChildren()
end
end
end)
It doesn't work at all past the number two for me, I've ran numerous tests, but it just won't work?

2 comments
btw I have tried different numbers other than 1 - 10, still doesn't work.
Btw there's also no output error