-
I’m trying to make a player check system that will, if we have a certain amount of players… it will start the game.
-
The issue is that when I try to use the CoreModule to get the value, it won’t recognize the value
-
I’ve tried using a string and the code
string.unpack()but that failed.
Error Script
local currentlyinrace = game.Workspace.GameTimer.currentlyinrace.Value
local CoreModule = require(script.Parent.CoreModule)
local gameFixed = false
local gamePlaying = false
local num = 0
while true do
wait(5)
print(CoreModule.CoreData.PlayersNeeded) -- This comes back with the value, 2.
if game.Players.NumPlayers >= CoreModule.CoreData.PlayersNeeded and game.Workspace.GameTimer.currentlyinrace.Value == false then
if gamePlaying == false then
gamePlaying = true
gameFixed = false
game.Workspace.GameTimer.currentlyinrace.Value = true
CoreModule.CoreData.Status.Value = "Intermission..."
CoreModule.FindFunction("Intermission")
wait(2)
end
elseif game.Players.NumPlayers < CoreModule.CoreData.PlayersNeeded and game.Workspace.GameTimer.currentlyinrace.Value == true then
game.Workspace.GameTimer.currentlyinrace.Value = false
CoreModule.CoreData.Status.Value = "2 players required to start game!"
if gamePlaying == true then
gamePlaying = false
if gameFixed == false then
gameFixed = true
CoreModule.FindFunction("Reset")
end
end
wait(2)
else
print("Check Completed")
CoreModule.CoreData.Status.Value = "First Check is not running correctly."
end
end
Core
--/Made By MillerrIAm\--
--/Services\--
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--/Core\--
Core = {
CoreData = {
Status = ReplicatedStorage:WaitForChild('StatusValue'),
Admins = {678299,571909198,489143945},
InRace = {},
AFK = {},
Winner = false,
Tie = false,
num = 1,
PlayersNeeded = 2,
}
}
return Core
Thank you for any help you can give me.

