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 » Club Houses » Clans & Guilds
Home Search
 

Re: FIX THIS CODE PLZ

Previous Thread :: Next Thread 
Azurecanist is not online. Azurecanist
Joined: 13 Mar 2014
Total Posts: 53252
20 Aug 2016 08:04 PM
Code #1

make it DONT REMOVE WEAPONS, anything that removes the weapons pls remove that code


mapdata = game.Workspace.MapData

function checkGuis()
local list = game.Workspace.MapData.GUIs:getChildren()
local P = game.Players:getChildren()
for i=1, #P do -- Player
local G = P[i].PlayerGui:getChildren()
for q=1, #G do -- Player's guis
local found = false
for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children
if G[q].Name == list[w].Name then
found = true
end
end
if found == true then
G[q]:remove()
end
end
end
end

function ClearMap()
mapdata.Model:ClearAllChildren()
game.Lighting.None:clone().Parent = mapdata.Model
game.StarterGui:ClearAllChildren()
game.StarterPack:ClearAllChildren()
local G = game.Workspace.StarterGui:GetChildren()
for i=1, #G do
G[i]:Clone().Parent = game.StarterGui
end
checkGuis()
local P = game.Players:GetChildren()
for i=1, #P do
P[i].Backpack:ClearAllChildren()
local Z = P[i].Character:getChildren()
for z=1, #Z do
if Z[z].ClassName == "Tool" then
Z[z]:remove()
end
end
end

local lightChild = game.Lighting:getChildren()
for i=1, #lightChild do
if lightChild[i].ClassName == "Sky" then
lightChild[i]:remove()
end
end
Respawn()
end

function Respawn()
local Players = game.Players:getChildren()
for i=1, #Players do
if Players[i].TeamColor ~= BrickColor.new("White") then
Players[i].TeamColor = BrickColor.new("White")
Players[i]:LoadCharacter()
end
end
local Teams = game.Teams:getChildren()
for i=1, #Teams do
if Teams[i].TeamColor ~= BrickColor.new("White") then
Teams[i]:remove()
else
Teams[i].AutoAssignable = true
end
end
end

ClearMap()
script:remove()



same with code #2

newMap = script.mapVal
mapdata = game.Workspace.MapData

function checkGuis()
local list = game.Workspace.MapData.GUIs:getChildren()
local P = game.Players:getChildren()
for i=1, #P do -- Player
local G = P[i].PlayerGui:getChildren()
for q=1, #G do -- Player's guis
local found = false
for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children
if G[q].Name == list[w].Name then
found = true
end
end
if found == true then
G[q]:remove()
end
end
end
end

function LoadMap()
ClearMap()
local NewMap = newMap.Value:clone()
local NewMapChildren = NewMap:getChildren()

for i=1, #NewMapChildren do
local t = NewMapChildren[i]
if t.ClassName == "Sky" then
t.Parent = game.Lighting
elseif t.ClassName == "Team" then
t.Parent = game.Teams
if game.Workspace.MapData.AutoAssign.Value == true then
t.AutoAssignable = true
else
t.AutoAssignable = false
end
elseif t.ClassName == "ScreenGui" then
t.Parent = game.StarterGui
t:clone().Parent = game.Workspace.MapData.GUIs
local P = game.Players:getChildren()
for z=1, #P do
local G = t:clone()
G.Parent = P[z].PlayerGui
end
elseif t.ClassName == "Tool" then
t.Parent = game.StarterPack
local P = game.Players:getChildren()
for z=1, #P do
local G = t:clone()
G.Parent = P[z].Backpack
end
end
end

local T = game.Teams:GetChildren()
if #T > 1 then
for u=1, #T do
if T[u].TeamColor == BrickColor.new("White") then
if game.Workspace.MapData.AutoAssign.Value == true then
T[u].AutoAssignable = false
else
T[u].AutoAssignable = true
end
end
end
else
for u=1, #T do
T[u].AutoAssignable = true
end
end
NewMap.Parent = mapdata.Model
end

function ClearMap()
mapdata.Model:ClearAllChildren()
game.StarterGui:ClearAllChildren()
game.StarterPack:ClearAllChildren()
local G = game.Workspace.StarterGui:GetChildren()
for i=1, #G do
G[i]:Clone().Parent = game.StarterGui
end
checkGuis()
local P = game.Players:GetChildren()
for i=1, #P do
P[i].Backpack:ClearAllChildren()
local Z = P[i].Character:getChildren()
for z=1, #Z do
if Z[z].ClassName == "Tool" then
Z[z]:remove()
end
end
end

local lightChild = game.Lighting:getChildren()
for i=1, #lightChild do
if lightChild[i].ClassName == "Sky" then
lightChild[i]:remove()
end
end
Respawn()
end

function Respawn()
local Players = game.Players:getChildren()
for i=1, #Players do
if Players[i].TeamColor ~= BrickColor.new("White") then
Players[i].TeamColor = BrickColor.new("White")
Players[i]:LoadCharacter()
end
end
local Teams = game.Teams:getChildren()
for i=1, #Teams do
if Teams[i].TeamColor ~= BrickColor.new("White") then
Teams[i]:remove()
else
Teams[i].AutoAssignable = true
end
end
end

LoadMap()
script:remove()


THANK YOU!!!


Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026
Report Abuse
Azurecanist is not online. Azurecanist
Joined: 13 Mar 2014
Total Posts: 53252
20 Aug 2016 08:06 PM
pls


Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026
Report Abuse
Azurecanist is not online. Azurecanist
Joined: 13 Mar 2014
Total Posts: 53252
20 Aug 2016 08:07 PM
a


Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026
Report Abuse
Cordavernus is not online. Cordavernus
Joined: 28 Dec 2012
Total Posts: 1181
20 Aug 2016 08:09 PM
"if Z[z].ClassName == "Tool" then
Z[z]:remove()"

It's also usually better to use a :Destroy() call instead of a :remove().

"game.StarterPack:ClearAllChildren()"


Report Abuse
Azurecanist is not online. Azurecanist
Joined: 13 Mar 2014
Total Posts: 53252
20 Aug 2016 08:10 PM
can u rewrite the code and remove all the code like that pls


idk how to remove it properly cus the script might break


Post to be on 40,000th post https://forum.roblox.com/Forum/ShowPost.aspx?PostID=195345026
Report Abuse
xKingSloth is not online. xKingSloth
Joined: 13 Mar 2015
Total Posts: 8353
20 Aug 2016 08:10 PM
Bump
Report Abuse
GetSporked is not online. GetSporked
Joined: 05 Jul 2012
Total Posts: 7972
20 Aug 2016 08:14 PM
local P = game.Players:GetChildren()
for i=1, #P do
P[i].Backpack:ClearAllChildren()
local Z = P[i].Character:getChildren()
for z=1, #Z do
if Z[z].ClassName == "Tool" then
Z[z]:remove()
end
end
end

just remove that

that's it

if u can't figure it out then frick off

with Great Vengeance and Furious Anger
Report Abuse
Veloric is online. Veloric
Joined: 24 Jul 2013
Total Posts: 12668
20 Aug 2016 08:15 PM



sheesh thats unorganized as anything.


/Vel/
Report Abuse
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
20 Aug 2016 08:41 PM
mapdata = game.Workspace.MapData

function checkGuis()
local list = game.Workspace.MapData.GUIs:getChildren()
local P = game.Players:getChildren()
for i=1, #P do -- Player
local G = P[i].PlayerGui:getChildren()
for q=1, #G do -- Player's guis
local found = false
for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children
if G[q].Name == list[w].Name then
found = true
end
end
if found == true then
G[q]:remove()
end
end
end
end

function ClearMap()
mapdata.Model:ClearAllChildren()
game.Lighting.None:clone().Parent = mapdata.Model
game.StarterGui:ClearAllChildren()
local G = game.Workspace.StarterGui:GetChildren()
for i=1, #G do
G[i]:Clone().Parent = game.StarterGui
end
checkGuis()
local P = game.Players:GetChildren()
for i=1, #P do
P[i].Backpack:ClearAllChildren()
local Z = P[i].Character:getChildren()
for z=1, #Z do
if Z[z].ClassName == "Tool" then
-- Z[z]:remove()
end
end
end

local lightChild = game.Lighting:getChildren()
for i=1, #lightChild do
if lightChild[i].ClassName == "Sky" then
lightChild[i]:remove()
end
end
Respawn()
end

function Respawn()
local Players = game.Players:getChildren()
for i=1, #Players do
if Players[i].TeamColor ~= BrickColor.new("White") then
Players[i].TeamColor = BrickColor.new("White")
Players[i]:LoadCharacter()
end
end
local Teams = game.Teams:getChildren()
for i=1, #Teams do
if Teams[i].TeamColor ~= BrickColor.new("White") then
Teams[i]:remove()
else
Teams[i].AutoAssignable = true
end
end
end

ClearMap()
script:remove()



same with code #2

newMap = script.mapVal
mapdata = game.Workspace.MapData

function checkGuis()
local list = game.Workspace.MapData.GUIs:getChildren()
local P = game.Players:getChildren()
for i=1, #P do -- Player
local G = P[i].PlayerGui:getChildren()
for q=1, #G do -- Player's guis
local found = false
for w=1, #list do --Compare against game.Workspace.MapData.GUIs's children
if G[q].Name == list[w].Name then
found = true
end
end
if found == true then
G[q]:remove()
end
end
end
end

function LoadMap()
ClearMap()
local NewMap = newMap.Value:clone()
local NewMapChildren = NewMap:getChildren()

for i=1, #NewMapChildren do
local t = NewMapChildren[i]
if t.ClassName == "Sky" then
t.Parent = game.Lighting
elseif t.ClassName == "Team" then
t.Parent = game.Teams
if game.Workspace.MapData.AutoAssign.Value == true then
t.AutoAssignable = true
else
t.AutoAssignable = false
end
elseif t.ClassName == "ScreenGui" then
t.Parent = game.StarterGui
t:clone().Parent = game.Workspace.MapData.GUIs
local P = game.Players:getChildren()
for z=1, #P do
local G = t:clone()
G.Parent = P[z].PlayerGui
end
elseif t.ClassName == "Tool" then
--[[t.Parent = game.StarterPack
local P = game.Players:getChildren()
for z=1, #P do
local G = t:clone()
G.Parent = P[z].Backpack
end]]
end
end

local T = game.Teams:GetChildren()
if #T > 1 then
for u=1, #T do
if T[u].TeamColor == BrickColor.new("White") then
if game.Workspace.MapData.AutoAssign.Value == true then
T[u].AutoAssignable = false
else
T[u].AutoAssignable = true
end
end
end
else
for u=1, #T do
T[u].AutoAssignable = true
end
end
NewMap.Parent = mapdata.Model
end

function ClearMap()
mapdata.Model:ClearAllChildren()
game.StarterGui:ClearAllChildren()
--game.StarterPack:ClearAllChildren()
local G = game.Workspace.StarterGui:GetChildren()
for i=1, #G do
G[i]:Clone().Parent = game.StarterGui
end
checkGuis()
local P = game.Players:GetChildren()
for i=1, #P do
P[i].Backpack:ClearAllChildren()
local Z = P[i].Character:getChildren()
for z=1, #Z do
if Z[z].ClassName == "Tool" then
-- Z[z]:remove()
end
end
end

local lightChild = game.Lighting:getChildren()
for i=1, #lightChild do
if lightChild[i].ClassName == "Sky" then
lightChild[i]:remove()
end
end
Respawn()
end

function Respawn()
local Players = game.Players:getChildren()
for i=1, #Players do
if Players[i].TeamColor ~= BrickColor.new("White") then
Players[i].TeamColor = BrickColor.new("White")
Players[i]:LoadCharacter()
end
end
local Teams = game.Teams:getChildren()
for i=1, #Teams do
if Teams[i].TeamColor ~= BrickColor.new("White") then
Teams[i]:remove()
else
Teams[i].AutoAssignable = true
end
end
end

LoadMap()
script:remove()
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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