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
 

Re: Script not working in online

Previous Thread :: Next Thread 
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
13 Aug 2011 05:05 PM
I have these two scripts that should work together to remove anyone's gear...script 1 works fine but script 2 doesn't in online mode...I obviously can't see the output, can anyone help?

Script 1 (in Workspace):

game.Players.PlayerAdded:connect(function(newPlayer)
coroutine.resume(coroutine.create(function()
repeat wait() until newPlayer.Character
wait(3)
for m, n in pairs(newPlayer.Character:GetChildren()) do
if (n.ClassName == "Tool") then
n:Remove()
end
end
for i, v in pairs(newPlayer.Backpack:GetChildren()) do
for x, y in pairs(newPlayer.StarterGear:GetChildren()) do
if (v.Name == y.Name) then
v:Remove()
end
end
end
c = game.Lighting.GearRemover:Clone()
c.Parent = game.Workspace
c.Assigned.Value = newPlayer
end))
end)
-------------------------------------------------------------------------------

Script 2 (in Lighting but cloned to Workspace; has an ObjectValue in it whose value is a player):

game.Players.PlayerAdded:connect(function(newPlayer)
coroutine.resume(coroutine.create(function()
repeat wait() until newPlayer.Character
wait(3)
for m, n in pairs(newPlayer.Character:GetChildren()) do
if (n.ClassName == "Tool") then
n:Remove()
end
end
for i, v in pairs(newPlayer.Backpack:GetChildren()) do
for x, y in pairs(newPlayer.StarterGear:GetChildren()) do
if (v.Name == y.Name) then
v:Remove()
end
end
end
c = game.Lighting.GearRemover:Clone()
c.Parent = game.Workspace
c.Assigned.Value = newPlayer
end))
end)
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
13 Aug 2011 05:30 PM
>.<
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
13 Aug 2011 05:35 PM
too many ends?

-orangegreenblue, also THE GAME
Report Abuse
orangegreenblue is not online. orangegreenblue
Joined: 04 Sep 2010
Total Posts: 10906
13 Aug 2011 05:35 PM
nevermind, perhaps you need a break in there

-orangegreenblue, also THE GAME
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