I'm trying to create a script that stops until a NumberValue in workspace is a certain value.
Example:
1 | game.workspace.part.transparency = 1 |
2 |
3 | wait(game.workspace.value.value = = 100 ) -- Trying to have the script stop here until the value = 100 |
4 |
5 | game.workspace.part.transparency = 0 |
Definitely don't know how to do it, thank you in advance.
The argument for wait is a number, not a boolean value.
what you want to do is this:
1 | workspace.part.Transparency = 1 |
2 |
3 | --since this is an intvalue, 'value' will just be the number. |
4 | workspace.Value.Changed:Connect( function (value) |
5 | if value = = 100 then |
6 | workspace.part.Transparency = 0 |
7 | end ) |