|
| 07 Nov 2014 11:33 PM |
I just got back from karate and literally forgot how to do touch functions
all i got it
function onTouched(hit)
end
i wanna make it when a certain block touches another block it continuously increases a value
gahhhh |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 07 Nov 2014 11:33 PM |
thing.Touched:connect(function(hit)
end) |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 07 Nov 2014 11:35 PM |
block.Touched:connect(function(hityeah)
yadayad
more stuff
end)
its all on wiki |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 11:35 PM |
| god stop my brain is spinning from sparring |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 07 Nov 2014 11:36 PM |
| i could only expect such an Idiotic Argument Name from an Idiot Coder like Thea97 |
|
|
| Report Abuse |
|
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 07 Nov 2014 11:36 PM |
script.Parent.Touched:connect(function(hit) if hit.Name == "BLOCK WE WANT TO TOUCH FOR VALUE INCREASE" while true do val = val +1 wait() -- what does increase a value cont. mean? end) |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 07 Nov 2014 11:36 PM |
"script.Parent.Touched:connect(function(hit) if hit.Name == "BLOCK WE WANT TO TOUCH FOR VALUE INCREASE" while true do val = val +1 wait() -- what does increase a value cont. mean? end)"
nononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononononono |
|
|
| Report Abuse |
|
|
Skoteinos
|
  |
| Joined: 29 Jul 2011 |
| Total Posts: 3203 |
|
|
| 07 Nov 2014 11:37 PM |
PARTVARIABLE.Touched:connect(function(hit)
(Insert desired function here, stating something about "hit.Parent" being another block, then either make a while true do loop or repeat loop, adding the desired value every desired time interval, like a second.)
end)
σκοτεινός απεργίες εσείς να λήθη |
|
|
| Report Abuse |
|
|
Verodoxys
|
  |
| Joined: 29 Jun 2012 |
| Total Posts: 18454 |
|
|
| 07 Nov 2014 11:38 PM |
>i wanna make it when a certain block touches another block it continuously increases a value
script.Parent.Touched:connect(function(hit) if hit.Name == "NAMEOFPARTHERE" then [VALUETHATYOUWANTTOINCREASE] = [VALUETHATYOUWANTTOINCREASE] + [HOWMUCHYOUWANTITTOINCREASE] end |
|
|
| Report Abuse |
|
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 07 Nov 2014 11:42 PM |
procellus,
is the nonono because of: 1) the missing end 2) the infinite loop 3) other
he did say the value should continually increase. an infinite loop accomplishes this. i even have a wait() function to prevent crashing |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 07 Nov 2014 11:43 PM |
@op
figure out how to do it yourself because everyone else's solutions here are wrong
if you are spoon fed info you wont get any better
don't use any of theirs |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 11:43 PM |
| proc my head is still spinning and i have a small migraine but im pretty sure that makes an infinite loop, and you forgot an end |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 11:44 PM |
proc my head is just spinning i need it done now so i asked for help |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 07 Nov 2014 11:44 PM |
"proc my head is still spinning and i have a small migraine but im pretty sure that makes an infinite loop, and you forgot an end"
stop making excuses and go relearn stuff on the Wiki lol, everything i did there was correct |
|
|
| Report Abuse |
|
|
Cirvius
|
  |
| Joined: 12 Jul 2011 |
| Total Posts: 18817 |
|
|
| 07 Nov 2014 11:45 PM |
| GENTLEMEN, TAKE IT OUTSIDE! |
|
|
| Report Abuse |
|
|
| |
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 07 Nov 2014 11:51 PM |
project desc: i wanna make it when a certain block touches another block it continuously increases a value
keys: 1. block touches 2. continuously increase a value
note: continuously the infinite loop is part of the design |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
| |
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 07 Nov 2014 11:53 PM |
but yeah the wiki is literally the best place to learn this if the language is confusing, let me know and i will literally log on and change it |
|
|
| Report Abuse |
|
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 07 Nov 2014 11:54 PM |
man i literally used literally twice in that post 0/10 to me |
|
|
| Report Abuse |
|
|