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

How do i make a intermission map script?I tryed alot of tutorials and they didnet work

I searched up a lot of tutorials but none work so plz help.

2 comments

0

use the tutorial on the wiki. Also this is not a request website this site is made to learn scripting and get help with your own scripts.

0

^ Hi. Accept the answer if it helped you

1 answer

##Hi, Backstabberor. For Future Reference, do not ask a question with no attempt of solving the code. I created a simple basic one which after a round of 30 sec, it teleports you to the map.

Watch the Video to see the output!

Here is the code

ServerScriptService


-- Declaration Section 
--//Game Services 
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

--//Assets
local Map = ReplicatedStorage:FindFirstChild("Map")
local DeployMapEvent = ReplicatedStorage:WaitForChild("DeployMap")
local spawnPosition = CFrame.new(-57.5, 7, -229)
local Lobby = Workspace:FindFirstChild("Lobby")

-- Processing Section 

deployMap = function ()
	Map:Clone()
	Map.Parent = Workspace
	wait(1)
	for number, Player in pairs(game.Players:GetChildren()) do
		if Player.Character and Player.Character:FindFirstChild("HumanoidRootPart")then
			Player.Character.HumanoidRootPart.CFrame = spawnPosition
		end 
	end
	Lobby:Destroy()
end


-- Connecting Section 

DeployMapEvent.OnServerEvent:Connect(deployMap)

StarterGui

-- Declaration Section 
--//Game Services
local Player = game:GetService("Players").LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--//Remote Events 
local DeployMapEvent = ReplicatedStorage:WaitForChild("DeployMap")

--//Assets
local IntermissionGui = PlayerGui:WaitForChild("IntermissionGui")
local Frame = IntermissionGui:WaitForChild("Frame")
local TextLabel = Frame:WaitForChild("TextLabel")

--Processing Section 
local function sendRequest ()
	for number = 30, 0, -1 do
		TextLabel.Text = "The New Game Starts in ".. number .." Sec/s"
		wait(1)
	end
	
	TextLabel.TextColor3 = Color3.new(255/255, 0/255, 0/255)
	TextLabel.Text = "Starting New Game!"
	wait(1)
	Frame:TweenPosition(UDim2.new(-0.007, 0, -1, 0), "Out", "Quad", 1)
	DeployMapEvent:FireServer()
end 

-- Output Section 
sendRequest()
Mark the question as answered and have a lovely day of coding!

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