|
| 22 Jun 2012 05:50 PM |
| I know how to do a function with a touched event. But how would I go about doing it if I wanted the user to stand on it for a certain amount of time? |
|
|
| Report Abuse |
|
|
Monktyr
|
  |
| Joined: 07 Apr 2012 |
| Total Posts: 21 |
|
|
| 22 Jun 2012 05:53 PM |
| You use the TouchEnded event. |
|
|
| Report Abuse |
|
|
Monktyr
|
  |
| Joined: 07 Apr 2012 |
| Total Posts: 21 |
|
|
| 22 Jun 2012 05:54 PM |
Example
Part = script.Parent Part.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then Down = true
wait(4) if Down == true then
---------------- -- CODE HERE -- -----------------
end end end)
Part.TouchEnded:connect(function() Down = false end) |
|
|
| Report Abuse |
|
|