I am fairly new to scripting but I am confused on why it is asking for me to close the function on line 3. | Also I want these actions to happen server wide so it is why this is running a regular script.
01 | local Door = game.Workspace.Door |
02 |
03 | Door.Touched:Connect( function (touched) |
04 | if touched.Parent:FindFirstChild( "Humanoid" ) then |
05 | if player.ID = = 560637180 then |
06 | Door.CanCollide = false |
07 | Door.Transparency = 0.8 |
08 | wait( 2.5 ) |
09 | Door.CanCollide = true |
10 | Door.Transparency = 0 |
11 | end |
12 | end |
01 | local Door = game.Workspace.Door |
02 |
03 | Door.Touched:Connect( function (touched) |
04 | local pname = touched.Parent.Name |
05 | local player = game.Players [ pname ] |
06 | if touched.Parent:FindFirstChild( "Humanoid" ) then |
07 | if player.UserId = = 560637180 then |
08 | Door.CanCollide = false |
09 | Door.Transparency = 0.8 |
10 | wait( 2.5 ) |
11 | Door.CanCollide = true |
12 | Door.Transparency = 0 |
13 | end |
14 | end |
15 | end ) |