The script (posted below) will freeze the server and I don't see why. This code is part of my Build Battle game, so after it is resolved I will censor it, but only because I don't want people stealing my game.
function doSpecialRound(buildTime, voteTime, intermissionTime)
throw("notification","This round will be different!")
wait(11)
throw("notification","This round you will have to guess what the player is building")
setStatus("Choosing builder...")
wait(3)
player = get_Child(game.Players,math.random(0,#game.Players:GetChildren()))
if player.Character and player.Character.HumanoidRootPart then
player.Character:MoveTo(workspace.Teleports.LobbyBase.base.Position)
end
-- Give tools
for i,v in pairs(game.ServerStorage.StamperTools:GetChildren()) do
tool = v:Clone()
tool.Parent = player.Backpack
end
ncs = script.Resources.NoChatScript:Clone()
ncs.Parent = player.Backpack
ncs.Disabled = false
workspace.MakeChat:FireAllClients("The bonus round has started! Chat what you think the builder is making!")
i = 90
category = tostring(cat[ch])
for i,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.main.Frame.Category.Text = "Mystery"
end
player.PlayerGui.main.Frame.Category.Text = category
-- Chat hook
setStatus("Mystery round...")
for i,v in pairs(game.Players:GetChildren()) do
pcall(function()
v.Chatted:connect(function(msg)
if string.lower(msg) == string.lower(category) then
throw("msg",v.Name .. " has guessed the theme!")
workspace.MakeChat("The theme was " .. category)
game.PointsService:AwardPoints(v.UserId,100)
v.leaderstats.Wins.Value = v.leaderstats.Wins.Value+1
for i,v in pairs(game.Players:GetChildren()) do
pcall(function()
v.Chatted:disconnect() -- Deprecated, but options are limited
end)
end
end
end)
end)
end
while i > -1 do
for i,v in pairs(game.Players:GetChildren()) do
pcall(function()
v.PlayerGui.main.Frame.Time = i
i=i-1
wait(1)
end)
end
end
end
EDIT (1):
local get_Child=function(obj,index)
return obj:children()[tonumber(index)]
end

2 comments
Beyond me, I would help... if I could
Ok thanks for the quick reply though