Billship
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 25 |
|
|
| 21 Oct 2013 03:58 PM |
| What would I have to do with a function to make it continuously repeat? While true do doesn't seem to work, or I'm just putting it in the wrong spot. |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 21 Oct 2013 03:59 PM |
function Name() -- What happens end
while true do wait() Name() end
Isn't this supposed to work? |
|
|
| Report Abuse |
|
|
Kisa97
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 1143 |
|
|
| 21 Oct 2013 04:00 PM |
I am not sure, Can you trigger a function from inside itself? If you can, then
function test() --script here
test()
--start up connection?
No clue :D Experiment! |
|
|
| Report Abuse |
|
|
Billship
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 25 |
|
|
| 21 Oct 2013 04:12 PM |
Here, let me show you what I mean:
count = script.Parent.Parent.Name function onClicked(playerWhoClicked) script.Parent.Parent.Name = count+1 --This is the thing I want to repeat, so that everytime the function onClicked happens, the count (name of the model) goes up by 1. It only goes up once, then it stops. wait(0.5) end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 21 Oct 2013 04:15 PM |
Uhh, do you have any output?
What are you exactly trying to do with the model, I do not understand, are you trying to make it count + 1 every time you click the button or what? |
|
|
| Report Abuse |
|
|
Billship
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 25 |
|
| |
|
Billship
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 25 |
|
|
| 21 Oct 2013 04:18 PM |
| Okay I figured it out on my own thanks for the help though |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 21 Oct 2013 04:20 PM |
count = script.Parent.Parent val = script.Parent.Parent["Value Name"] --Make it NumValue function onClicked(playerWhoClicked) count.Name = "Count: " ..val wait(0.5) end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|