Answered by
5 years ago Edited 5 years ago
EOF
stands for End of File. Each scope that gets created is required to be closed, in other languages it can be determined by different syntax, however Lua defines a closed scope via the end
keyword.
At line 43
you didn’t close the scope respectfully, also left an open end in an improper scope too, at 71
.
Fixed program.
003 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
004 | local ServerStorage = game:GetService( "ServerStorage" ) |
005 | local MapsFolder = ServerStorage:WaitForChild( "Maps" ) |
006 | local Status = ReplicatedStorage:WaitForChild( "Status" ) |
010 | Status.Value = "Waiting for enough players" |
011 | repeat wait() until game.Players.NumPlayers > = 2 |
012 | Status.Value = "Intermission" |
017 | for i, player in pairs (game.Players:GetPlayers()) do |
019 | table.insert(plrs,player) |
026 | local AvailableMaps = MapsFolder:GetChildren() |
027 | local ChosenMap = AvailableMaps [ math.random( 1 ,#AvailableMaps) ] |
028 | Status.Value = ChosenMap.Name.. " Chosen" |
029 | local ClonedMap = ChosenMap:Clone() |
031 | ClonedMap.Parent = workspace |
034 | local SpawnPoints = ClonedMap:FindFirstChild ( "SpawnPoints" ) |
035 | if not SpawnPoints then |
036 | print ( "Spawnpoint not found" ) |
037 | local AvailableSpawnPoints = SpawnPoints:GetChildren () |
039 | for i, player in pairs (plrs) do |
041 | character = player.Character |
046 | character:FinsFirstChild ( "HumanoidRootPart" ).CFrame = AvailableSpawnPoints [ 1 ] .Cframe |
047 | table.remove(AvailableSpawnPoints, 1 ) |
052 | local ClassicSword = ServerStorage.ClassisSword:clone () |
053 | ClassicSword.Parent = player.Backpack |
055 | local Handgun = ServerStorage.Handgun:clone () |
056 | Handgun.Parent = player.Backpack |
058 | local GameTag = Instance.new( "BoolValue" ) |
059 | Gametag.Name = "GameTag" |
060 | Gametag.Parent = player.Charatcer |
076 | Status.Value = "Starting in 5" |
080 | Status.Value = "Starting in 4" |
084 | Status.Value = "Starting in 3" |
088 | Status.Value = "Starting in 2" |
092 | Status.Value = "Starting in 5" |
096 | for i = GameLength, 0 , - 1 do |
097 | for x, player in pairs (plrs) do |
100 | character = player.Character |
102 | if not character then |
105 | if character:FindFirstChild( "GameTag" ) then |
107 | print (Player.Name.. "is still in the game!" ) |
Please do not follow YouTube tutorials unless they’re explaining or demonstrating a subject. Most programs are highly inefficient or buggy. Please try to do 80% of the work on your own.