game.Players.PlayerAdded:connect(function(player) local stats = Instance.new("IntValue", player) stats.Name = "leaderstats" local points = Instance.new("IntValue", stats) points.Name = "Points" local ingame = Instance.new("BoolValue", player) ingame.Name "InGame" end)
minigames = game.Lighting.Minigames:GetChildren() h = Instance.new("Hint", game.Workspace) function removePlate() local plates = game.Workspace.DisappearingPlates.Plates:GetChildren() local ranNum1 = math.random(1,#plates) local ranNum2 = 1 while ranNum1 == ranNum2 do local ranNum2 = math.random(1,#plates) wait(1) end local plateChosen = plates(ranNum1) local plateChosen2 = plates(ranNum2) for i = 0, 1, 0.06 do plateChosen.Transparency = i plateChosen2.Transparency = i wait(1) end plateChosen:Destroy() plateChosen2:Destroy() end while true do wait() --gotta have that if game.Players.NumPlayers > 1 then h.Text = "Deciding what game to play" wait(3) ranGame = math.random(1, #minigames) gameChosen = minigames[ranGame] h.Text = "Minigame chosen: " .. gameChosen.Name wait(3) gameChosenClone = gameChosen:Clone() gameChosenClone.Parent = game.Workspace wait(3) --Teleporting players to map spawns = gameChosenClone.Spawns:GetChildren() for i,v in pairs(game.Players:GetPlayers()) do check = v.Character -- I'm guessing it that had to do with something from here, so instead of finding the player's name in workspace, I just directly pulled the character from player using Character. if check then checkHumanoid = check:FindFirstChild("Humanoid") if checkHumanoid then v.Character:MoveTo(spawns[i].Position) end end end for i = 3, 1, -1 do h.Text = "Game begins in: " .. i wait(1) end if gameChosenClone.Name == "DisappearingPlates" then timeTillGameEnds = 20 --Countdown until the game ends for i = timeTillGameEnds, 1, -1 do h.Text = "Time Left: " .. i removePlate() end else h.Text = "There needs to be more than 1 player to start" wait(1) end end end
I fixed it. I just forgot an equal sign in there
-- Made by RetroThieff game.Players.PlayerAdded:connect(function(player) local stats = Instance.new("IntValue", player) stats.Name = "leaderstats" local points = Instance.new("IntValue", stats) points.Name = "Points" local ingame = Instance.new("BoolValue", player) ingame.Name = "InGame" end)