|
| 08 Apr 2012 07:31 PM |
Also, I'm not sure if in line 2 I put the right event.
local c = script.Parent script.Parent.Clicked:connect(function(part) if part = script.Parent then part.Transparency = 1 wait (1) part.Transparency = 0 end end)
|
|
|
| Report Abuse |
|
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 07:32 PM |
when saying something is equal to, use ==. Like this
local c = script.Parent script.Parent.Clicked:connect(function(part) if part == script.Parent then part.Transparency = 1 wait (1) part.Transparency = 0 end end) |
|
|
| Report Abuse |
|
|
zakary99
|
  |
| Joined: 19 Jan 2010 |
| Total Posts: 1095 |
|
| |
|
zakary99
|
  |
| Joined: 19 Jan 2010 |
| Total Posts: 1095 |
|
|
| 08 Apr 2012 07:33 PM |
| We wrote the same thing at the same time. I was gonna say try that. :P |
|
|
| Report Abuse |
|
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 07:33 PM |
Also didn't catch this, Clicked isn't an event
Put a clickdetector in the brick
local c = script.Parent script.Parent.ClickDetector.Clicked:connect(function(part) if part = script.Parent then part.Transparency = 1 wait (1) part.Transparency = 0 end end) |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 07:36 PM |
| Yeah I had a click detector on the brick but I didn't know how to type the event. And I've never understand why you can't just put =. Not ==. |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 07:42 PM |
@Quo
That wouldn't work :S
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 07:49 PM |
| Knight, what would the event be then. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 07:55 PM |
| MouseButton1Down, I think I totally forgot. |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 07:58 PM |
so try
local c = script.Parent script.Parent.ClickDetector.Mouse1ButtonDown:connect(function(part) if part = script.Parent then part.Transparency = 1 wait (1) part.Transparency = 0 end end) |
|
|
| Report Abuse |
|
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 08:00 PM |
Fail by me...
local c = script.Parent script.Parent.ClickDetector.MouseClick:connect(function(part) if part = script.Parent then part.Transparency = 1 wait (1) part.Transparency = 0 end end) |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:08 PM |
| I tried that, and it didn't work, but nothing is coming out of output. |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:13 PM |
@Quo
No, just combine the things you said... The second fix, you forgot to do the first.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:15 PM |
So
script.Parent.ClickDetectorMouseClick:connect(function(part) |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:16 PM |
local c = script.Parent
script.Parent.ClickDetector.MouseClick:connect(function(part) if part == script.Parent then --I don't get it part.Transparency = 1 wait (1) part.Transparency = 0 end end)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:18 PM |
| you don't understand the 3rd line? :o |
|
|
| Report Abuse |
|
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 08:18 PM |
| @ wwe, the 3rd line is pretty pointless |
|
|
| Report Abuse |
|
|
| |
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 08:20 PM |
Nope, this should work fine.
local c = script.Parent script.Parent.ClickDetector.MouseClick:connect(function(part) part.Transparency = 1 wait (1) part.Transparency = 0 end) |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:26 PM |
| Raig it wont work still e.e |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:30 PM |
@Quo
That would change the player's transparency... which would error...
† KMXD † |
|
|
| Report Abuse |
|
|
Quovis
|
  |
| Joined: 24 Mar 2012 |
| Total Posts: 494 |
|
|
| 08 Apr 2012 08:31 PM |
try this.
local c = script.Parent script.Parent.ClickDetector.MouseClick:connect(function(part) script.Parent.Transparency = 1 wait (1) script.Parent.Transparency = 0 end) |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 08:31 PM |
@Knight: Yes, the output said transparency is not a valid member of player
I'm confused what (part) even does in the second line of this script anyways |
|
|
| Report Abuse |
|
|