Stuck on LockCursor script

This script should pause and lock the cursor in a standalone player, but it doesn’t seem to work

if your refereing a web player , thats what i thought to , but apparently lockCursor does not work with Web Player? It doesnt ever seem to work for me , and yet in stand alone PC build , it works fine.

This is for standalone… i don’t know where it went wrong but the debug console says all is good