Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a auto changing map and the intermission? [closed]

Asked by 7 years ago
Edited 7 years ago

I have been working on a server but i dont know how to change the map or load a intermisson if anyone can help that well be great thanks

Closed as Not Constructive by hiimgoodpack, adark, and Azarth

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I hope this will help watch previous videos for additional scripting help.

https://www.youtube.com/watch?v=oawuZNaM-rI&list=PLuEQ5BB-Z1PJ4JIDXpttxuvCzJMeIqzMi&index=18

If this is what you needed please accept my answer.

I also added a script

local RoundLength = 10 -- How long the rounds are in seconds.
local IntermissionLength = 5 -- How long the intermission is in seconds.
local RoundStartTime -- To tell when the round starts.
local map = workspace:WaitForChild("Map")
map.Parent = game:Workspace("ServerStorage")

local function initialize()
    local MapCopy = map:Clone()-- A copy of the map
    MapCopy.Name = "MapCopy"
    MapCopy.Parent = game.Workspace
    RoundStartTime = tick() -- Tick = What current time is in seconds.

    return MapCopy
end

local function cleanup(Map)
Map:Destroy()
end

while true do
    local Map = initialize()-- Puts current time in round start time.

    repeat  wait(0.1)
      local CurrentTime = tick()
        local TimeSinceGameStarted = CurrentTime - RoundStartTime
        print(TimeSinceGameStarted)
    until TimeSinceGameStarted > RoundLength
        cleanup(this_map)  
    wait(IntermissionLength)

end

This will start a round and after the round it will reload the map then start the intermission.

0
Its not game:Workspace("ServerStorage"), it is game:GetService("ServerStorage") hiimgoodpack 2009 — 7y
Ad