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 » Scripters
Home Search
 

Re: Is there anything wrong in this script?

Previous Thread :: Next Thread 
FailingClock is not online. FailingClock
Joined: 05 Aug 2014
Total Posts: 5482
25 Mar 2015 02:45 PM
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "FailingClock" then
if string.lower(chat) == "open/obby2" then
if not game.Workspace:FindFirstChild("Obby2") then
game.Lighting["Obby2"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "close/obby2" then
if game.Workspace:FindFirstChild("Obby2") then
game.Workspace["Obby2"]:Remove()
end
end
end
end)
end)
Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
25 Mar 2015 02:49 PM
no
Report Abuse
FailingClock is not online. FailingClock
Joined: 05 Aug 2014
Total Posts: 5482
25 Mar 2015 02:50 PM
its not working though
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 02:50 PM
Use :Destroy(), not :Remove(). But yeah, it's fine.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
25 Mar 2015 02:51 PM
Ignore him; he's a troll from what I've seen of him. Does it give *any* output at all?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
25 Mar 2015 02:51 PM
i dont see anything wrong yet after looking at it for a bit,

but you should replace game.Players.ChildAdded

with game.Players.PlayerAdded

just in case something else is added to players besides a player object

don't use lighting to store maps and stuff, use ServerStorage/ReplicatedStorage

and don't use remove, it is deprecated
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 02:51 PM
What about it isn't working? Are you getting errors?
Report Abuse
FailingClock is not online. FailingClock
Joined: 05 Aug 2014
Total Posts: 5482
25 Mar 2015 02:57 PM
The obby isnt loading
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
25 Mar 2015 02:58 PM
also you forgot to use :MakeJoints

assuming your obby is a model like it should be
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 03:01 PM
Are you sure the obby is in the right area inside workspace? Is 'Obby2' inside lighting filled with stuff? Maybe you goofed and deleted stuff inside, from what I can tell though, this script should work, aside from the game.Players.ChildAdded part; you should change that to game.Players.PlayerAdded

It is a script inside workspace... right?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
25 Mar 2015 03:02 PM
you forgot to give your model a position/cframe

so if your script is working correctly it just gets put at 0,0,0
Report Abuse
FailingClock is not online. FailingClock
Joined: 05 Aug 2014
Total Posts: 5482
25 Mar 2015 03:03 PM
@Bloo, yes
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 03:05 PM
@instawin

If copied directly from lighting, it gets put in the place it was before it was put into lighting.

If I put a car at 100,20,-50 in lighting, then copy it and put the copy in workspace, it will be exactly like the original car; position, rotation, speed, all that jazz.
Report Abuse
FailingClock is not online. FailingClock
Joined: 05 Aug 2014
Total Posts: 5482
25 Mar 2015 03:05 PM
Could it be that obby 1,2,3,4 and 5 are in a model together?
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 03:06 PM
Plan A.B, throw a bunch of print()'s in there and see what you get. That can solve about 50% of every scripters problems.
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
25 Mar 2015 03:06 PM
Isn't there a model called "Obby2" directly inside lighting?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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