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
|
  |
| Joined: 05 Nov 2007 |
| Total Posts: 11492 |
|
|
| 25 Sep 2014 08:38 PM |
| *Happens before someone clicks |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 05 Nov 2007 |
| Total Posts: 11492 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 05 Nov 2007 |
| Total Posts: 11492 |
|
|
| 25 Sep 2014 08:55 PM |
| I haven't slept for 24 hours. |
|
|
| Report Abuse |
|
|