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: Finder

Previous Thread :: Next Thread 
JonathanW123 is not online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
15 Aug 2015 08:39 PM
Is it possible to quickly make it so anything in the game named PointLight, Enabled = false


Falcons for Life
Report Abuse
76km is not online. 76km
Joined: 14 Aug 2015
Total Posts: 5455
15 Aug 2015 08:40 PM
yes there is

wiki.roblox.com

yes there is there is many ways to do this.
Report Abuse
JonathanW123 is not online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
15 Aug 2015 08:42 PM
in less than 10 lines O_O?


Falcons for Life
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
15 Aug 2015 08:43 PM
for iv in pairs

find the name of it
if its pointlight then enabled == false

you get the gist


"Correct me if I'm wrong, but I'm normally right." -eLunate
Report Abuse
76km is not online. 76km
Joined: 14 Aug 2015
Total Posts: 5455
15 Aug 2015 08:44 PM
while true do
wait()
for _, i in pairs (game.Workspace:GetChildren()) do
if i.Name = "Name here of thing"
--code to change
end
end

that will find anyting of name here and i is the object. It will do it repeatedly.
Report Abuse
DogeKip is not online. DogeKip
Joined: 06 Mar 2011
Total Posts: 6860
15 Aug 2015 08:46 PM
for _, b in pairs(workspace:GetChildren()) do
if b.Name == "PointLight" then
b.Enabled = true
end
end
workspace.ChildAdded:connect(function(child)
if child.Name == "PointLight" then
child.Enabled = true
end
end)

[DATA EXPUNGED]
Report Abuse
JonathanW123 is not online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
15 Aug 2015 08:48 PM
What if it's a bunch of Parts in Workspace?


Falcons for Life
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
15 Aug 2015 08:50 PM
It will find every pointlight in workspace.


"Correct me if I'm wrong, but I'm normally right." -eLunate
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
15 Aug 2015 09:03 PM
while workspace:findFirstChild("PointLight",true) then
workspace:findFirstChild("PointLight",true):Destroy()
end
Report Abuse
lIllIIlll is not online. lIllIIlll
Joined: 14 Aug 2015
Total Posts: 10
15 Aug 2015 09:45 PM
function check(p)
for _, part in pairs(p:GetChildren()) do
if part:IsA("PointLight") then
part.Enabled = false
else
check(part)
end
end
end

check(workspace)
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