|
| 14 Nov 2014 09:02 PM |
function onClicked(playerWhoClicked) ------ code end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Model -PointLight -Part --ClickDetector
how do i make when i click part (Hold) Pointlight range +1? when realese it will stop?
Thank you please answer |
|
|
| Report Abuse |
|
|
Xsitsu
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 14 Nov 2014 09:07 PM |
ClickDetectors only have one event for activation, and that is simple clicking (player held mouse down, and then released it). They don't keep track of if someone is holding their mouse down or not.
This script will increment the range of the light by 1 every time the button is clicked.
function onClicked(playerWhoClicked)
script.Parent.Parent.PointLight.Range = script.Parent.Parent.PointLight.Range + 1
end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 14 Nov 2014 09:36 PM |
For da holding thing check out dese:
SuraceGui, TextButton, MouseButton1Down, MouseButton1Up |
|
|
| Report Abuse |
|
|
|
| 14 Nov 2014 09:43 PM |
local Poop = Add Function Poop = Not a script\ If Player Poop then poop == Function , now this is a script game.workspace.parent:remove()
|
|
|
| Report Abuse |
|
|
| |
|