generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Non-Working Map Changing Script

Previous Thread :: Next Thread 
Discern is not online. Discern
Joined: 02 Feb 2013
Total Posts: 331
04 Feb 2013 07:49 PM
Can someone help me with this map changing script?

admins = {"Discern", "FireFang4589", "hypnoticdrew", "altforRigbyxx", "Fireball6675", "00EpicPenguin00"}
map = game.Workspace.Map
door = game.Workspace.Door
w = game.Workspace:GetChildren()
sf = game.Lighting.SF:GetChildren()
gf = game.Lighting.GF:GetChildren()
walls = game.Workspace.InnerWalls:GetChildren()

function onChat(msg)
if string.lower(msg) == "open walls" then
if door.Value == true then
door.Value = false
for i, v in pairs(walls) do
v.Transparency = 1
v.CanCollide = false
s = Instance.new("SelectionBox", v)
s.Color = BrickColor.new("Medium stone grey")
s.Adornee = v
end
end

elseif string.lower(msg) == "close walls" then
if door.Value == false then
door.Value = true
for i, v in pairs(walls) do
v.CanCollide = true
v.Transparency = 0.7
v.SelectionBox:Destroy()
end
end

elseif string.lower(msg) == "start sf" then
if map.Value == false then
map.Value = true
m = Instance.new("Message", game.Workspace)
m.Text = "Loading Swordfighting."
wait(2)
m:Destroy()
sf.Parent = game.Workspace
for i, v in pairs(sf) do
if v.ClassName == "Part" then
s = Instance.new("SelectionBox", v)
s.Adornee = v
s.Color = BrickColor.new("Really red")
v.Transparency = 0
wait(.2)
s:Destroy()
wait(.2)
end
end
m = Instance.new("Message", game.Workspace)
m.Text = "Swordfighting Loading Completed. Please wait for further instructions."
wait(5)
m:Destroy()
end

elseif string.lower(msg) == "start gf" then
if map.Value == false then
map.Value = true
m = Instance.new("Message", game.Workspace)
m.Text = "Loading Gunfighting."
wait(2)
m:Destroy()
gf.Parent = game.Workspace
for i, v in pairs(gf) do
if v.ClassName == "Part" then
s = Instance.new("SelectionBox", v)
s.Adornee = v
s.Color = BrickColor.new("Really red")
v.Transparency = 0
wait(.2)
s:Destroy()
wait(.2)
end
end
m = Instance.new("Message", game.Workspace)
m.Text = "Gunfighting Loading Completed. Please wait for further instructions."
end

elseif string.lower(msg) == "clear map" then
if map.Value == true then
map.Value = false
for i = 1, #w do
if w[i].Name == "SF" or w[i].Name == "GF" then
w[i].Parent = game.Lighting
t = w[i]:GetChildren()
for i = 1, #t do
if t[i].ClassName == "Part" then
t[i].Transparency = 1
end
end
end
end
m = Instance.new("Message", game.Workspace)
m.Text = "Map Cleared. Please wait for further instructions."
wait(5)
m:Destroy()
end
end
end

game.Players.PlayerAdded:connect(function(player)
for i, v in pairs(admins) do
if player.Name == v then
player.Chatted:connect(onChat)
end
end
end)
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
04 Feb 2013 07:50 PM
This is a case of 'over complicated'...and yes, I could help you, no I won't.
Report Abuse
Discern is not online. Discern
Joined: 02 Feb 2013
Total Posts: 331
04 Feb 2013 07:51 PM
Why not?
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
04 Feb 2013 07:54 PM
I'm too lazy to make a custom command script for you. Or even fix it. I dunt leik fixing things...
Report Abuse
Discern is not online. Discern
Joined: 02 Feb 2013
Total Posts: 331
04 Feb 2013 07:56 PM
-_-
Report Abuse
Discern is not online. Discern
Joined: 02 Feb 2013
Total Posts: 331
04 Feb 2013 08:16 PM
Found out the problem ._.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image