what is wrong with it. I put it in starterpack so it runs automatically. nothing happens.
game.Players.PlayerAdded:connect(function(player)
wait()
while true do
if game.Workspace.PlayerCount.Players.Value <= 2
then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Waiting for at least FIVE players to join..",
Color = Color3.new(100, 100, 0),
Font = Enum.Font.SourceSansLight,
FontSize = Enum.FontSize.Size18,
print("made it here lol")
})
wait(10)
end
wait()
if game.Workspace.PlayerCount.Players.Value >= 2
and game.Workspace.game.CanCollide == true
then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Welcome to the annual HUNGER GAMES",
Color = Color3.new(100, 0, 0),
Font = Enum.Font.SourceSansLight,
FontSize = Enum.FontSize.Size18,
})
local a = true
if a == true then
player.TeamColor = BrickColor.new("Forest green")
wait(10)
game.Workspace.game.CanCollide = false
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "If you don't know how to play, read the description!",
Color = Color3.new(0, 100, 0),
Font = Enum.Font.SourceSansLight,
FontSize = Enum.FontSize.Size18,
})
a = false
local b = true
wait(10)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Selecting random arena...",
Color = Color3.new(100, 100, 530),
Font = Enum.Font.SourceSansLight,
FontSize = Enum.FontSize.Size18,
})
elseif 1 b == true then
wait(5)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Arena selected. Prepare to enter the game. May the odds be ever in your favor.",
Color = Color3.new(322, 100, 0),
Font = Enum.Font.SourceSansLight,
FontSize = Enum.FontSize.Size18,
})
b = false
local c = true
elseif
c == true
then
wait(20)
local Pos = player.Character:GetPrimaryPartCFrame()
player:LoadCharacter()
player.Character:SetPrimaryPartCFrame(Pos)
if player.Character:FindFirstChild("ForceField") then
player.Character["ForceField"]:Destroy()
wait(1)
game.ReplicatedStorage.Remotes.tp:FireServer()
c = false
end end
end
end
end)

6 comments
Didn't you post this question yesterday?
i changed it
Unfortunately, I don't exactly know how to help you. I'm posting this comment because you've been asking a lot of questions about your game, and I'm assuming you're making a Hunger Games replica. Looks interesting. I'm actually kind of curious as to how it is going to turn out lol. Will probably check it out when it's done. Good luck figuring things out, man!
thank you!
Reply to your comment. This is why your script never works in StarterPlayer. Either move the script to
Workspace/ServerScriptServiceor change it toLocal Script.Do accept the answer so we can both earn some reputation points and close it for future references.