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: Need QUICK help, simple problem

Previous Thread :: Next Thread 
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:37 PM
It is saying attempt to index MouseButton1Down, a nil value???
Is in a LocalScript.

Relevant code:

sp.Name.MouseButton1Down:connect(function()
db = false
cam.CameraSubject = workspace.Recycling
cam.Focus = CFrame.new(-122.562, 11.299, -9.771)
db = true
end)

Happens when someone clicks.
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:38 PM
*Happens before someone clicks
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
25 Sep 2014 08:40 PM
.Name

this is a property, so if its a button called "Name" then change it if not, remove '.Name'
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 08:42 PM
db = true
sp.Name.MouseButton1Down:connect(function() -- Is sp.Name a button?
if db = true then
db = false
cam.CameraSubject = workspace.Recycling
cam.Focus = CFrame.new(-122.562, 11.299, -9.771)
db = true
end
end)
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:42 PM
Oh god I really made that stupid an error.

It was named "Recycling" but it wasn't a valid member so I named it the first thing that came into my head.

Ty.
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:44 PM
So I change it to Yolo, right? Problem I had before:

sp.Yolo.MouseButton1Down:connect(function()
db = false
cam.CameraSubject = workspace.Recycling
cam.Focus=CFrame.new(-122.562, 11.299, -9.771)
db = true
end)

Yolo is not a valid member of ScreenGui, but it is a TextButton and clearly is.
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 08:46 PM
is the textbutton inside of a frame, or just inside of the screengui?
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:47 PM
Just inside screengui.
Report Abuse
CreamyBadness is online. CreamyBadness
Joined: 05 Nov 2013
Total Posts: 844
25 Sep 2014 08:48 PM
If that is not a section, you didn't specify what SP and DB was. If it is, then never mind.

sp = script.Parent
db = debounce
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:49 PM
local sp = script.Parent
local cam = workspace.CurrentCamera
local db = true
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
25 Sep 2014 08:50 PM
Btw, you're changing the value of db but you never use it.

To use just do:

local db = false

sp.Yolo.MouseButton1Down:connect(function()
if not db then
db = true
cam.CameraSubject = workspace.Recycling
cam.Focus = CFrame.New(-122.562,11.299,-9.771)
db = false
end
end)


If it weren't for attorneys, we wouldn't need attorneys.
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:52 PM
@rapster

I'm not using it for a reason IK.
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
25 Sep 2014 08:53 PM
Then what's the point of a debounce is you aren't using it?


If it weren't for attorneys, we wouldn't need attorneys.
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 08:54 PM
Can you help me again rapster?

http://www.roblox.com/Forum/ShowPost.aspx?PostID=146765230
Report Abuse
Vulnerite is not online. Vulnerite
Joined: 05 Nov 2007
Total Posts: 11492
25 Sep 2014 08:55 PM
I haven't slept for 24 hours.
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