function newSkin() if(math.random(1) > 0.5) then print("bigger") else print("smaller") end end if(player:WaitForDataReady()) then wait(script.Parent.Visible == true) x = 0 while(x < 500000) do script.Parent.MouseButton1Click:connect(function() newSkin() end) x = x + 1 wait(0.03) end player:Destroy() end
Why doesn't it even load "newSkin()"? You can see the game here. I'm baffled
First off, you don't need to connect the function to the event half a million times. Second, try changing line 2 to this: if (math.random(1,2)>1) then
Finally, try taking out the WaitForDataReady().
The final script should look like this:
function newSkin() if math.random(1,2)>1 then print("bigger") else print("smaller") end end script.Parent.MouseButton1Click:connect(newSkin)
That should fix the newSkin() issue. Hope this helped!