You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Make the text show on the gui -
What is the issue? Include screenshots / videos if possible!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried FireAllClients()
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Server Script
-- Start Variables
local MinigameChoose = script.Choose.Value
local EnoughPlayers = false
local StartRound = true
local EpicCheck = false
local PlayerCount = 0
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local events = ReplicatedStorage:WaitForChild("events")
-- Check Players
game.Players.PlayerAdded:Connect(function()
PlayerCount = PlayerCount + 1
print(PlayerCount)
end)
game.Players.PlayerRemoving:Connect(function()
PlayerCount = PlayerCount - 1
print(PlayerCount)
end)
while true do
wait(1)
if PlayerCount == 2 then
EnoughPlayers = true
elseif EnoughPlayers == true then
if EpicCheck == true then
events.intermission:FireAllClients(PlayerCount)
EpicCheck = false
end
end
end
local script
-- Variables
local ReplicatedService = game:GetService("ReplicatedStorage")
local events = ReplicatedService:WaitForChild("events")
local event1 = events.intermission
local event2 = events.statusFail
local sec = 60
-- Intermission
event1.OnClientEvent:Connect(function(PlayerCount)
repeat wait(1)
if PlayerCount >= 2 then
sec = sec - 1
script.Parent.Text = ("Intermission : "..sec)
elseif PlayerCount <= 2 then
script.Parent.Text = ("Not enough Players to begin, Invite your Friends!")
end
until sec == 0
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.