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: what's the script designed when I need to...

Previous Thread :: Next Thread 
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:30 AM
click on it, PointLight turns on, but when I click on it again, the light is disabled. How do i do that?
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:31 AM
click on a brick*
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Jul 2014 10:33 AM
brick.ClickDetector.MouseClick:connect(function()
light.Enabled = not light.Enabled;
end);

define brick as the part in workspace or wherever you have it and add a ClickDetector in it
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:34 AM
but in other way, in "else" statement
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
24 Jul 2014 10:35 AM
not makes true false and false true.

~Swagilitious and not Nutricious~
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:36 AM
oh i get it

"else" requires "if" statement
but I'll try with "not" statement
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:37 AM
It's easier with script.Parent than part's name
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:41 AM
wait(15)
script.Parent:FindFirstChild("Thread")
Thread.Instance.new("Bump")
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
24 Jul 2014 10:45 AM
brick.ClickDetector.MouseClick:connect(function()
Spawn(wait);if light.Enabled then
light.Enabled = false
else
light.Enabled = true
end
end);
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:46 AM
wait(15)
script.Parent:FindFirstChild("Thread")
Thread.Instance.new("Bump")
Bump.Power = 99.7
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 10:47 AM
YES I GOT IT FINNALY
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 03:57 PM
nevermind
I NEED A FULL SCRIPT
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE
FULL ONE


Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 03:58 PM
IM ONLY 12 YEARS OLD, DON'T THINK I AM A GREAT PROGRAMIST YOU NOOBS
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 04:00 PM
brick.ClickDetector.MouseClick:connect(function()
light.Enabled = not light.Enabled;
end);


That is a full script

It'll toggle every time you click it
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 04:00 PM
I NEED TO FICKING LEARN
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Jul 2014 04:01 PM
'IM ONLY 12 YEARS OLD, DON'T THINK I AM A GREAT PROGRAMIST YOU NOOBS'
I hate when people say that, use age as excuse.
If you want to learn:

if light.Enabled == true then
light.Enabled = false
else
light.Enabled = true
end
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 04:05 PM
@128

does NOT focking work
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
24 Jul 2014 04:07 PM
^ be nice m8
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Jul 2014 04:07 PM
It does work, you just aren't defining brick or light correctly (or at all)
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 04:08 PM
I NEED function onClicked(), not some complicated crap, which makes me confused.
AND A FULL SCRIPT, NOT 3 LINES
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
24 Jul 2014 04:09 PM
"Project: Tree"
Not sure if coolio
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 04:09 PM
why everyone gives a crap about primary groups?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Jul 2014 04:10 PM
Since when was "FULL SCRIPT" defined by line numbers?
Here...

function onClicked()
if script.Parent.Light.Enabled == true then
script.Parent.Light.Enabled = false
elseif script.Parent.Light.Enabled == false then
script.Parent.Light.Enabled = true
else
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 04:12 PM
https://www.youtube.com/watch?v=ZqRHP0lJdhI
Report Abuse
xThisIsUltraPwning is not online. xThisIsUltraPwning
Joined: 16 May 2014
Total Posts: 7522
24 Jul 2014 04:13 PM
finally someone who isn't stupid
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