|
| 20 Jul 2012 12:20 PM |
SCRIPT IN WORKSPACE THAT DOESN'T WORK
function onPlayerLeaving(Player) local x = game.Workspace:FindFirstChild("Home"..script.Parent.Parent.Parent.Parent.Name) if not (x) then return else x.Home:Remove() x.Name = "Home" wait(.5) s = game.Lighting["Home"..script.Parent.Parent.Parent.Parent.Name] s.Parent = x s.Name = "Home" end end game.Players.PlayerRemoving:connect(onPlayerLeaving)
SCRIPTED GUI BUTTON THAT DOES WORK
function onButtonClicked() local x = game.Workspace:FindFirstChild("Home"..script.Parent.Parent.Parent.Parent.Name) if not (x) then return else x.Home:Remove() x.Name = "Home" wait(.5) s = game.Lighting["Home"..script.Parent.Parent.Parent.Parent.Name] s.Parent = x s.Name = "Home" end end script.Parent.MouseButton1Click:connect(onButtonClicked)
|
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 12:23 PM |
| The top script won't work in Play Solo. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 12:24 PM |
| I tried it in multi-player, with an alt. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Jul 2012 12:27 PM |
| I'm sorry I'm not a very experienced scripter, how do I find the output? |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 12:36 PM |
| Well it depends. In Play Solo, you go View > Output, but if you're testing it in online mode you should make messages that signify checkpoints in your script. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 12:45 PM |
Here is the model, maybe you'll have better luck finding the output.
http://www.roblox.com/Home-Door-item?id=87074716 |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 12:47 PM |
| I think maybe it's something on line 2. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Jul 2012 06:23 PM |
| I set everything up including the GUI and PlayerRemoving part and the door and it all worked fine, so I don't know what to tell you. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 06:51 PM |
| Can you set it up so I can see? |
|
|
| Report Abuse |
|
|