You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I want to make it so it will only count certain players with a BoolValue that is set to true. -
What is the issue?
Doesn’t necessarily work and I don’t know why.
The value is inside all of the players as it’s cloned. -
What solutions have you tried so far?
I’ve tried only check when they’re past the menu but that doesn’t work.
Any other things on the Developer Hub don’t really lead to my answer.
Script
local replicatedstorage = game:GetService("ReplicatedStorage")
local eventenough = replicatedstorage.EnoughPlayers
local desertvotes = replicatedstorage.DesertVotes.Value
local islandvotes = replicatedstorage.IslandsVotes.Value
local treevotes = replicatedstorage.TreeVotes.Value
local desert = replicatedstorage.Desert
local islands = replicatedstorage.Islands
local tree = replicatedstorage.Tree
local players = game:GetService("Players")
while wait() do
if #players:GetPlayers() == 1 and players:GetPlayers().GameValues.Lobby.Value == true then
eventenough:FireAllClients()
print("Enough Players!")
wait(25)
if desertvotes > islandvotes and treevotes then
desert:Clone().Parent = workspace
elseif islandvotes > desertvotes and treevotes then
islands:Clone().Parent = workspace
elseif treevotes > desertvotes and islandvotes then
tree:Clone().Parent = workspace
end
else
print("Not enough Players")
wait(25)
end
end
It may be a little messy but I think you get the point.