|
| 05 Sep 2017 11:12 PM |
Brick = script.Parent
Brick.Touched:connect(function() game.Workspace.Block.Transparency = 1 end)
What would I need to do to make it to where if the part is no longer touched, it does certain code?
R+://899893970 "I'm a better Yoshi than you." [ATR] |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:16 PM |
pl0x
R+://899893970 "I'm a better Yoshi than you." [ATR] |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:18 PM |
I lonelyz...
R+://899893970 "I'm a better Yoshi than you." [ATR] |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:20 PM |
I don't really think you can do that, actually. If it's necessary for the object to be touched first, you could use loops and bools to check if it's still being touched and activate the code only when it's no longer being touched, but if that's not essential, just make it so that it runs the code automatically and only changes when it's being touched.
A good decision is based on knowledge and not on numbers. -Plato |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:34 PM |
But how does Roblox know if the part is no longer being touched?
R+://899893970 "I'm a better Yoshi than you." [ATR] |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:54 PM |
TouchEnded
http://wiki.roblox.com/index.php?title=API:Class/BasePart/TouchEnded
#code Do not give up; the beginning is always the hardest part. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:55 PM |
Brick = script.Parent
Brick.Touched:connect(function() game.Workspace.Block.Transparency = 1 end)
Brick.TouchEnded:connect(function() --some piece of code print("pr00f it works") end)
#code Do not give up; the beginning is always the hardest part. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2017 11:59 PM |
Wow, it actually worked! Thank you so much. You deserve a full chocolate m&m cookie.
R+://899893970 "I'm a better Yoshi than you." [ATR] |
|
|
| Report Abuse |
|
|