Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

help it says Expected 'end' (to close 'do' at line 15), got <eof> ?

Asked by 4 years ago

-- Define variables --Made by munder12e--

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorage:WaitForChild("Status")

local GameLength = 80

-- Game loop

while true do

Statues.Value = "Waiting for enough players"

repeat  wait(1) until game.Players.NumPlayers >= 2

Status.value = "intermission starting in 10"

wait (10)

local plrs = {}

for i, player in pairs (game.Pyer:GetPlayers()) do
    if  player then
        table.insert(plrs,player) -- Add each player into plrs table
    end
end

wait (2)

local AvailableMaps = MapsFolder:GetChildren()

local ChosenMap = AvailableMaps[math.random(1,#AvailableMaps)]

Status.Value = ChosenMap.Name.." Chosen"

local ClonedMap = ChosenMap:Clone()
ClonedMap.Parent = workspace

-- Teleport players to the map

local SpawnPoints = ClonedMap:FindFirstChild ("SpawnPoints")
if not SpawnPoints then
    print("Spawnpoint not found")

local AvailableSpawnPoints = SpawnPoints:GetChildren ()

for i, player in pairs (plrs)do
    if player then
        character = player.Character

        if character then
        -- Teleport them

        character:FinsFirstChild ("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].Cframe
        table.remove(AvailableSpawnPoints,1)


        -- Give them a sword

        local ClassicSword = ServerStorage.ClassisSword:clone ()
        ClassicSword.Parent = player.Backpack

        local Handgun = ServerStorage.Handgun:clone ()
        Handgun.Parent = player.Backpack

        local GameTag = Instance.new("BoolValue")
        Gametag.Name = "GameTag"
        Gametag.Parent = player.Charatcer

    else
        -- There is no character
        if not player then
            table.remove(plrs,i)



        end

        end

    end
end

end~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~

0
line 11 you did game.Pyers HappyTimIsHim 652 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Your script needs another "end" in it, read your entire Script again and find where that "end" needs to be placed, Also instead of Players you wrote "Pyer" at line 11, while this isn't causing the error, it will once you fix the main error.

Ad

Answer this question