Here is my script:

while true do
	local status = game.ReplicatedStorage.Status
	local module = script.Parent.Module
	status.Value = "2 or More Players are Needed to Start!"
	repeat wait() until #game.Players:GetPlayers() >= 2
	module.inter(30,0,1,"Intermission: ") --Here
	wait(30.5)
	status.Value = "Round Starting!"
	wait(5)
	local maps = game.ServerStorage.Maps
	local chosen = maps[math.random(maps:GetChildren())]
	chosen.Parent = workspace
	for i, v in pairs(game.Players:GetPlayers()) do
		local t = Instance.new("BoolValue")
		t.Name = "Tag"
		t.Parent = v
		v.HumanoidRootPart.Position = chosen:FindFirstChild("Spawn"..i).Position
	end
	for i = 10,0,-1 do
		status.Value = "The Spinner Will Start in "..tostring(i).." seconds!"
	end
	module.round(45,0,1,"Time Remaining: ") --Here
	local SpinSpeed = 0.03
	game.ReplicatedStorage.RoundOn.Value = true
	local spin = game.ReplicatedStorage.Spin
	spin.Value = 45
	while spin.Value >= 1 do
		script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,0, 0) * CFrame.fromEulerAnglesXYZ(0, ""..SpinSpeed.."", 0)
		wait()
		game.ReplicatedStorage.Over.OnServerEvent:Connect(function()
			spin.Value = 0
		end)
	end
	status.Value = "Round Over!"
	for i, v in pairs(game.Players:GetPlayers()) do
		if v:FindFirstChild("Tag") then
			v.Tag:Destroy()
			v.leaderstats.Points.Value = v.leaderstats.Points.Value  + 15
		end
	end
	wait(5)
end

Here is my module script:

local module = {

inter = function(num1,num2,inc,prefix)
	for i = num1,num2,-inc do
		game.ReplicatedStorage.Status.Value = prefix..tostring(i)
		wait(inc)
	end
end,

round = function(num1,num2,inc,prefix)
	for i = num1,num2,-inc do
		game.ReplicatedStorage.Status.Value = prefix..tostring(i)
		wait(inc)
	end
end
}

return module

Any help would be greatly appreciated. Thanks in advance!

3 comments

0

Both are in ServerScriptService.

0

local module = require(script.Parent.Module)

0

Omg I keep making simple mistakes lol. Could you make an answer so I could accept it?