Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --IMPORTANT THE MAPS YOU MAKE (which sould be a modle) must be uner ONE modle as in
- -- ALL MAPS UNDER *_1_* Modle called Maps
- -- Lighting>Maps>Map1>parts of map
- -- Lighting>Maps>Map2>map parts
- --With full commentary!
- --Update (Aug. 10th) I updated the message, not the issue with the message not haveing a space is fixed.
- --Update 1/4/11 I made it so welds don't break.
- -- For the ROBLOX engine.
- -- Configuration ------------------------------------------------------------------------------------------
- local mapDirectory = game.Lighting.Maps -- This is where your maps are!
- local msg = Instance.new("Message") -- Makes a new message
- msg.Parent = game.Lighting -- Defines the messages parent
- local time = script.Time -- Defines what time is, which is the value under this
- -- Script ----------------------------------------------------------------------------------------------------
- --Da Loop--
- while true do -- The Loop
- local maps = mapDirectory:getChildren() -- Defins what maps means
- --And of Da Loop--
- -----This is the fail safe-----
- if #maps == 0 then --Counts how many maps there are, if theres 0, removes da script.
- print("Maps not found! Selfremoving...") --lets you know whats going on
- script:remove() --removes the script
- return
- end -- Ends this function
- -----Fail Safe Ends-----
- ---Part that picks da maps-----
- local pickedMap = maps[math.random(1, #maps)] --Defines Pickedmap, as 1-# of maps
- local pickedMapClone = pickedMap:clone() --defines what the picked mapcline is
- pickedMapClone.Parent = game.Workspace -- defines the parent of the piced map
- pickedMapClone:makeJoints() -- required whenever you insert a model into the world, otherwise it falls apart (From Telamon)
- msg.Parent = game.Workspace --makes a message
- msg.Text = "Map Change!" --makes the text
- wait(3) --waits 3 seconds
- msg.Text = "Picked Map is " ..pickedMapClone.Name.."." --makes the message of what map
- print("Map inserted: " .. pickedMap.Name) --says when map is made
- wait(5) --waits 5 secs.
- msg.Parent = game.Lighting
- wait(time.Value) --the value time is refrenced to the time of waitness
- pickedMapClone:remove() --removes the cloned map
- end
- --by Nate
- --Qestions? Comments? Feel free to PM me, I owuld love to help!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement