I have a module script with all the gamemodes in it, my problem is that whenever I call I value from this script to my main one, It doesn’t know it.
Main Script
gamemodes.Flood()
Module Script
local gamemodes = {
Flood = function()
while wait() do
local Up = 290
wait()
repeat
ChosenMap.Water.CFrame = ChosenMap.Water.CFrame + Vector3.new(0, 0.05, 0)
wait(0.08)
Up = Up - 1
until #playersInRound == 0 or Up <= 0 or game.ReplicatedStorage.InRound.Value == false
if #playersInRound == 0 then
break
end
wait(4)
repeat
ChosenMap.Water.CFrame = ChosenMap.Water.CFrame + Vector3.new(0, -0.05, 0)
wait(0.01)
until #playersInRound == 0 or game.ReplicatedStorage.InRound.Value == false
break
end
end
}
return gamemodes
My problem here is that the module script can’t find players in round. In the main script the players in round is created. It also can’t get the chosen map because it is random. Someone please help me find a fix to this. I am lost…