6 players is not a valid member of DataModel "Sword game roblox 2.rbxl" - Server - Main script:19 21:04:41.096 Stack Begin - Studio 21:04:41.096 Script 'ServerScriptService.Main script', Line 19 - Studio - Main script:19 21:04:41.097 Stack End - Studio
-- Dfine veriables
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local MapsFolder =ServerStorage:WaitForChild("Maps")
local Status = ReplicatedStorage:WaitForChild("Status")
local GameLength = 50
-- Game loop
while true do
Status.Value = "Waiting for enough players"
repeat wait(1) until game.players.NumPlayers >= 2
Status.Value = "Intermission"
wait(10)
local plrs = {}
for i, player in pairs (game.Players:GetPlayers()) do
if player then
table.insert(plrs,player) -- Add each player into plrs table
end
end
I am folowing this vidio https://www.youtube.com/watch?v=1MappXJ51Oo. and this https://www.youtube.com/watch?v=vCpl5M_9mcQ Pleas help me?
