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: Private Darkness

Previous Thread :: Next Thread 
AGOleader is not online. AGOleader
Joined: 25 Sep 2009
Total Posts: 19
17 Apr 2014 04:35 PM
Alright, you know in Stop it Slender and Darkness how while all the players have darkness and the picked person has a light?

Right. How do you have that person have their own personal light? How are you able to make them unaffected by the global lighting and have everyone else affected by it?

Let's say in a local script I found the player ect. What do I do from there? Do I use the current camera or what?
Report Abuse
AGOleader is not online. AGOleader
Joined: 25 Sep 2009
Total Posts: 19
17 Apr 2014 04:40 PM
Sorry; but bump.
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
17 Apr 2014 04:43 PM
"Inject" PointLight into the character, put PointLight into Lighting then:

while true do
Players = game.Players:GetChildren()
game.Lighting.PointLight:clone() = Players.Character
end

If you want it for only one RANDOM player then do this:
Players = game.Players:GetChildren()
Player = math.random(1 #Players)
game.Lighting.PointLight:clone() = Player.Character
end

#SCRRRRRRRRR
Report Abuse
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
17 Apr 2014 04:47 PM
@youssef, you'd need to make sure you actually get the players from the table, too.


Players = game.Players:GetChildren()
Player = Players[math.random(#Players)]
game.Lighting.PointLight:clone().Parent = Player.Character


"math.random(#Players)" is a number, which doesn't have a character itself.
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
17 Apr 2014 04:48 PM
Oops, my bad xD

#SCRRRRRRRRR
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
17 Apr 2014 04:49 PM
while true do
Players = game.Players:GetChildren()
game.Lighting.PointLight:clone() = Players.Character
end

^wrong


Players = game.Players:GetChildren()
for _, v in pairs(Players) do
game.Lighting.PointLight:Clone() = v.Character
end
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
17 Apr 2014 04:49 PM
Players = game.Players:GetChildren()
for _, v in pairs(Players) do
game.Lighting.PointLight:Clone() = v.Character
end

^wrong

Players = game.Players:GetChildren()
for _, v in pairs(Players) do
game.Lighting.PointLight:Clone().Parent = v.Character
end

#nerdsunited
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