I am making an SCP game and I am scripting for SCP 173. Here's the script:
01 | local part = script.Parent |
02 |
03 | part.Touched:Connect( function (hit) |
04 | local hum = hit.Parent:FindFirstChild( "Union" ) |
05 | if hum then |
06 | repeat |
07 | script.Parent.Anchored = true |
08 | print ( "Player see" ) |
09 | wait( 1 ) |
10 | until hum = = nil |
11 | elseif hum = = nil then |
12 | repeat |
13 | script.Parent.Anchored = false |
14 | print ( "player ignore" ) |
15 | wait( 1 ) |
16 | until hum |
17 | end |
18 |
19 |
20 | end ) |
i am trying to do a repeat but it just doesn't stop. Help appreciated!