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: Can someone help me update this script?

Previous Thread :: Next Thread 
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
28 Nov 2013 02:06 PM
function Check(Td)
local LTd = Td
local OTd = game.ServerStorage.Td:Clone()
game.Players.PlayerRemoving:connect(function(p)
if LTd.Owner.Value == p then
LTd:Remove()
OTd.Parent = workspace
Check(OTd)
end
end)
end

function search(obj)
if obj.Name == "Owner" and obj.className == "ObjectValue" then
Check(obj.Parent)
end
for i, v in pairs(obj:GetChildren()) do
search(v);
end
end
search(workspace);


the above script was made for me by galaxen. As hard as I try to understand it, I simply don't. Maybe I'm overthinking it. I don't know.
The point of the script is to check all 6 maps to find which player left, and then set the clone's parent to workspace, replacing the used map. Now, the script does work, but for some reason, the cloned map wont allow new players to claim it. My only thought is that the map being cloned to workspace probably has the same name as another map. Maps are named accordingly Td1, Td2, etc, all the way to 6.

Anyone think they can fix this?
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
28 Nov 2013 02:25 PM
bump
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
28 Nov 2013 02:48 PM
bump
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
29 Nov 2013 11:16 AM
bump
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
29 Nov 2013 01:25 PM
bump
Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
29 Nov 2013 02:09 PM
uh... can you explain it a little more? I'm a bit confused..
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
29 Nov 2013 08:08 PM
the script clones a Td map when the server is started. The reset event fires when a player leaves, checking all of workspace for models that have an ObjectValue named Owner in them, which in this case is only the Td maps, and then removes that map and replaces it with the cloned one. For some reason, the maps only work once, because when a player leaves, the map that was placed into workspace to replace the old one doesnt allow new players to use it.

simple explanation is i don't know why.
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
30 Nov 2013 09:28 AM
Professor Bump
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
30 Nov 2013 01:49 PM
bump
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
30 Nov 2013 10:26 PM
bump again
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
02 Dec 2013 12:03 PM
bumped
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