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 » Scripters
Home Search
 

Re: How do I make a script for onTouch lighting

Previous Thread :: Next Thread 
nicevsmean123 is not online. nicevsmean123
Joined: 04 Jan 2014
Total Posts: 13339
29 Apr 2017 05:04 PM
I'm trying to gather information about scripting, but I'll give a brief description of what I'm trying to do:

A player steps on a block which triggers another block with spotlight to turn on

I'm completely new to this and I don't know what to do
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
29 Apr 2017 05:07 PM
local deb = true

script.Parent.Touched:connect(function()
if deb then
deb = false
workspace.OtherPart.SpotLight.Enabled = not workspace.OtherPart.SpotLight.Enabled
wait(1)
deb = true
end
end)
Report Abuse
Adrian12094 is online. Adrian12094
Joined: 01 Feb 2014
Total Posts: 3172
29 Apr 2017 05:09 PM
workspace.Block.Touched:connect(function(hit)

-- code --
end)


Report Abuse
NovaPrimus is not online. NovaPrimus
Joined: 21 Apr 2013
Total Posts: 455
29 Apr 2017 05:09 PM
u froob u beat me to it


Report Abuse
nicevsmean123 is not online. nicevsmean123
Joined: 04 Jan 2014
Total Posts: 13339
29 Apr 2017 05:21 PM
Thank you so much!!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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