generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Light Button

Previous Thread :: Next Thread 
astrosyedst is not online. astrosyedst
Joined: 19 Oct 2012
Total Posts: 458
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 is not online. 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 is not online. 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
pischokiller is not online. pischokiller
Joined: 16 Dec 2011
Total Posts: 3902
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
astrosyedst is not online. astrosyedst
Joined: 19 Oct 2012
Total Posts: 458
14 Nov 2014 09:53 PM
not funny pun ^^
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image