Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

-- 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~~~~~~~~~~~~~~~~~


1 comment

0

line 11 you did game.Pyers

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.