|
| 12 Sep 2013 08:18 PM |
As probably some of you know, I've been making a few topics about help with a script. This time, it's just plain annoyance. I've done everything I can. I'm convinced its because of Roblox Studio.
function b1click() --The function doesn't even start. if select == 1 and du1 == false then --By default, the condition should already be true. d1 = Instance.new("Decal") d1.Name = "Decal" d1.Parent = di1 d1.Texture = "http://www.roblox.com/asset/?id=20040403" select = 2 du1 = true num1 = 1 end end b1.ClickDetector.MouseClick:connect(b1click) --Function linked here.
I hope the answer isn't in front of my face.. :P |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2013 08:21 PM |
| you didn't define select or du1 (du1 == nil by default) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2013 08:25 PM |
| I did, but it's not shown in the post. |
|
|
| Report Abuse |
|
|
| |
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 13 Sep 2013 06:56 AM |
| Show all of the variable definitions. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 07:01 AM |
| @OP. the person that doesn't know how to receive halp from SH. Post the full script. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 07:27 AM |
Here are the variables used in the script (with original values):
ui = script.Parent.ui di1 = ui.displays.display1 select = 1 du1 = false num1 = nil |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 07:28 AM |
Oh, I forgot about b1:
b1 = ui.buttons.button1 |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 07:30 AM |
| Are you sure the casing is correct? Capitalization matters. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 07:35 AM |
| Yeah, pretty sure. I try to not use capitalization as much as I can to make the scripting easier. I did check the other things that require it (properties, events, etc) and it all seems right. |
|
|
| Report Abuse |
|
|
| |
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 13 Sep 2013 03:16 PM |
What is b1? GuiButton or part? Either way you don't specify clickdetector |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2013 04:46 PM |
| Its a part. Look where I link the function ("b1.ClickDetector.MouseClick:connect(b1click)"). |
|
|
| Report Abuse |
|
|