In a while true do
loop you must add wait() or else the code will crash causing Studio to crash (possibly)
What I suggest you do is label all the variables;
2 | local V = script:WaitForChild( 'Voice' ) |
3 | local plr = game.Players.LocalPlayer |
remember you can use the player in local scripts!
If that script is only part of your code then, please add the rest in.
Anyway, the script should look like this if you have all your variables;
05 | if (game.Workspace.Enemyskilled.Value = = 8 ) then |
06 | print ( "Wave 1 finished" ) |
09 | player.PlayerGui.Wave 1 :Destroy() |
If you are able to add all variables and make sure this is a local script and all then your good to go!
Anyway, this is basically a model for you to learn on why your script isn't working.
- You probably didn't add wait()
- you probably got the variables wrong
- this is probably a server script, that's why player doesn't work
If you checked through all of those then your code should work
If I helped then please accept answer ;)
Good luck and have fun developing!