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
|
  |
| Joined: 25 Sep 2009 |
| Total Posts: 19 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 17 Apr 2014 04:48 PM |
Oops, my bad xD
#SCRRRRRRRRR |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|