link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 15 Apr 2012 12:54 PM |
Door = game.Workspace.CurrentCamera:FindFirstChild(script.Parent.Parent.Parent.Name)
script.Parent.MouseButton1Click:connect(function() if script.Parent.Parent.TextBox.Text == "1396" then script.Parent.Text = "Correct!" game.Workspace.CurrentCamera.CameraSubject = game.Workspace.CurrentCamera.Test wait(2) script.Parent.Parent.Visible = false for i = 1, 10 do wait(0.1) Door.Transparency = Door.Transparency + 0.1 end Door.CanCollide = false wait() game.Workspace.CurrentCamera.CameraSubject = game.Workspace:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Name).Humanoid elseif script.Parent.Parent.TextBox.Text ~= "1396" then script.Parent.Text = "Incorrect" script.Parent.Parent.Visible = false end end)
Door.Touched:connect(function(hit) if Door.Transparency == 0 and hit.Parent:FindFirstChild("Humanoid") then script.Parent.Parent.Visible = true end end)
The script works fine. I am wondering will the script only affect my Player, or will the door open for everyone? |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
| |
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 15 Apr 2012 01:29 PM |
| Judging by the `MouseButton1Click` event, it depends on who has the GUI. |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 15 Apr 2012 01:41 PM |
| I don't think you understand... |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 02:32 PM |
| it will only opens for you, if only you have the LocalScript. |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 15 Apr 2012 03:03 PM |
| Awesome, just what I wanted :D |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 15 Apr 2012 03:11 PM |
| No, no, no. It's a GUI, as the MouseButton1Click event. Whoever has the GUI, has access to the function. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 15 Apr 2012 03:13 PM |
@cheatmaster,
That's not correct. LocalScripts don't mean only one person has it. It means the code runs client side (I believe). |
|
|
| Report Abuse |
|
|
HAPPYBOY
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 585 |
|
|
| 15 Apr 2012 03:48 PM |
| What Flurite says is true. Do you recall the LocalScript exploits? They could exploit those because they are client side. |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 15 Apr 2012 04:02 PM |
| LocalScripts can be exploited by CE and co. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 15 Apr 2012 04:07 PM |
| To answer the OP, yes it would only open the door for you, assuming the door is parented to your camera. Anything parented to a camera is NEVER seen by anyone but the user of that camera. |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 12:36 AM |
@Flurite I know that. I only try to tell if it works. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 16 Apr 2012 02:38 PM |
@cheatmaster,
Well that's a bad way to try and tell if it works because that statement is false? |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 01:56 AM |
Read this to learn about LocalScript: http://wiki.roblox.com/index.php/LocalScript |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 17 Apr 2012 05:59 PM |
lawlawlawl,
So you're saying that only one person can use it because it's in a LocalScript? What in there says that only one player have the script? |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 06:05 PM |
*Me trying to sound pro*
It'll work if the door is in the Camera object, and if you have a localscript. P.S. HAI LINK |
|
|
| Report Abuse |
|
|
|
| 18 Apr 2012 05:05 AM |
@Flurite You don't understand what I am talking about, so just forget it. |
|
|
| Report Abuse |
|
|
link7002
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 18 Apr 2012 06:57 AM |
| Nice bagwan, lol. I'm trying to get an answer so I can check. I'm pretty sure it work, though |
|
|
| Report Abuse |
|
|