Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

help me, Round system script not working? but it works on studio mode lol

So, my problem is that when i test my game by joining it from the roblox site and testing it from the server test in studio, my round GUI doesnt work, and my others scripts too. So whats the problem? i am new so, sorry if i missing something very simple hehe

if you need my code tell me, i will post it

https://imgur.com/a/B8hw5qo The text is the default of my label, it should be named "intermission 5,4,3.., Round: 120,119,etc." pls help me

2 comments

0

send script.

0

see my comment

1 answer

raid6n help

local inRound = game.ReplicatedStorage.InRound
local rs = game:GetService("ReplicatedStorage")
local serverStorage = game:GetService("ServerStorage")
local intermission = 5
local RoundLength = 120
local Status = game.ReplicatedStorage.Status
local Maps = game.ServerStorage.Maps:GetChildren()
local players = game.Players:GetPlayers()

local function givePlayers()
	local players = game.Players:GetChildren()
	local tommyGun = serverStorage:FindFirstChild("Tommy Gun")
	if tommyGun then
		local tool = tommyGun:Clone()
	tool.Parent = players.Backpack
	end
end

local function playerToLobby()
	
	local LobbySpawns = game.Workspace.Lobby:FindFirstChild("LobbySpawns"):GetChildren()
	
	for _, players in pairs(game.Players:GetPlayers())do
		if inRound == false then
			players.Backpack:ClearAllChildren()
			players.Character.HumanoidRootPart.CFrame = LobbySpawns[math.random(1,#LobbySpawns)].CFrame + Vector3.new(0,5,0)
		end
	end
end



local function TeleportPlayers(playersAvaibles, spawns)	
	for _, playersAvaibles in pairs(playersAvaibles)do
		if playersAvaibles:FindFirstChild("HumanoidRootPart")then
			for i, v in pairs(playersAvaibles) do
				if v.Team.Name == "Red bois" then
					 if spawns:FindFirstChild("RedSpawn") then
						v.Character.HumanoidRootPart.CFrame = spawns["RedSpawn"].CFrame + Vector3.new(0,5,0)
					end
				else
					if spawns:FindFirstChild("BlueSpawn") then
						v.Character.HumanoidRootPart.CFrame = spawns["BlueSpawn"].CFrame + Vector3.new(0,5,0)
					end
				end
			end
		end
	end
end



while true do
	repeat 
		
		Status.Value = "Need 2 players to start! "
		wait(1)
		
	until #game.Players:GetPlayers() >= 0
	
	
	
	for i = intermission,0,-1 do 
		Status.Value = "intermission: " .. i 
		wait(1)	
		print("loop 1 sucess")	
	end	
	
	print("getting on round code block.")
		givePlayers()
	
	for i = 120, 0, -1 do 
		Status.Value = "Round: " .. i
		wait(1)
	end
	
players.Backpack:FindFirstChild("Tommy Gun"):Destroy()	
	
end	
	
	print("loop 2 sucess")
	

This discussion is preserved as it was. New answers, comments, and votes are closed.