01 | local Stage 1 = script.Parent |
02 | local Reset = Instance.new( "BoolValue" ) |
03 | Reset.Parent = Stage 1 |
04 | Reset.Name = "StageReset" |
05 | Reset.Value = false |
06 | local Start = Stage 1. StartPart |
07 | local Finish = Stage 1. FinishPart |
08 |
09 | Finish.Touched:connect( function () |
10 | print "Finished" |
11 | if Reset.Value = = false then |
12 | Reset.Value = true |
13 | Stage 1. Target 1. ColorPart 1. BrickColor = "Really red" |
14 | Stage 1. Target 1. ColorPart 2. BrickColor = "Really red" |
15 | Stage 1. Door 1. Transparency = 0.8 |
16 | Stage 1. Door 1. Script.Disabled = false |
17 | Stage 1. Door 1. CanCollide = true |
18 | end |
19 | end ) |
This should be in a regular script if it is on the server side.(in the workspace.) localscripts are only used on the client side(in the player or in the character.)
The touched event is already serverside so you do not need remote events or anything. just change the script to a regular old script.