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: Localscript/Camera help

Previous Thread :: Next Thread 
link7002 is not online. 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 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
15 Apr 2012 01:20 PM
Can noone answer this?
Report Abuse
Flurite is not online. 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 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
15 Apr 2012 01:41 PM
I don't think you understand...
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
15 Apr 2012 02:32 PM
it will only opens for you, if only you have the LocalScript.
Report Abuse
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
15 Apr 2012 03:03 PM
Awesome, just what I wanted :D
Report Abuse
Flurite is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
16 Apr 2012 12:36 AM
@Flurite
I know that. I only try to tell if it works.
Report Abuse
Flurite is not online. 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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
17 Apr 2012 01:56 AM
Read this to learn about LocalScript:
http://wiki.roblox.com/index.php/LocalScript
Report Abuse
Flurite is not online. 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
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
18 Apr 2012 05:05 AM
@Flurite
You don't understand what I am talking about, so just forget it.
Report Abuse
link7002 is not online. 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
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