|
| 22 Apr 2013 06:39 AM |
This works in solo mode but not in online mode... When the player joins it will put a model inside their camera so only they can see it but it only works in solo mode...
game.Players.PlayerAdded:connect(function(player) repeat wait() until game.Workspace:FindFirstChild("Camera") game.Lighting.Starter:clone().Parent = game.Workspace.CurrentCamera end)
for _, player in pairs(game.Players:GetPlayers()) do PlayerAdded(player) end
|
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 06:40 AM |
| I've tried a LocalScript and that does not work but only works in a script. |
|
|
| Report Abuse |
|
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 22 Apr 2013 06:58 AM |
| First of all you cannot use CurrentCamera alone in the script and you cannot use playeradded in localscripts, so yea, ALOT of Flaws, you cannot fix. |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 07:03 AM |
| Sooooooo what would I use/do? |
|
|
| Report Abuse |
|
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:10 AM |
| You could use coroutines and remove the player added event... |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 07:11 AM |
If I insert a script then put this in the script:
game.Players.PlayerAdded:connect(function(player) repeat wait() until game.Workspace:FindFirstChild("Camera") end)
for _, player in pairs(game.Players:GetPlayers()) do PlayerAdded(player) end
then put a LocalScript inside the script with this:
game.Lighting.Starter:clone().Parent = game.Workspace.CurrentCamera
??? |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 07:12 AM |
| How would I make it call the LocalScript when the PlayerAdded is fired? |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:13 AM |
| Do you even know how a local script works? |
|
|
| Report Abuse |
|
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 22 Apr 2013 07:15 AM |
| ^ You are stating the wrong thing he should be doing. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:17 AM |
| ? The wrong thing is that he is using a Player added event in a local script. Not to mention he needs to index current camera. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:18 AM |
| He needs to go back to the basics as I think he just skipped to camera manipulation. |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 07:23 AM |
| I know the basics but I'm figuring out a new way to do it. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:28 AM |
..... Okay here is what you need to know:
1. You do not use Player Added in a local script. They run automatically for the player every time he joins/spawns.
2. You can not use this in a regular script.
3. Do this and come back with the output. |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 07:34 AM |
Ok, I removed the PlayerAdded function and put it in a LocalScript... (If that's what I'm meant to do)
repeat wait() until game.Workspace:FindFirstChild("Camera") game.Lighting.Starter:clone().Parent = game.Workspace.CurrentCamera
|
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 08:01 AM |
| Did you put the local script in player Gui? |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 08:10 AM |
| No, I will and I think I know how, I will come back if I fail! |
|
|
| Report Abuse |
|
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|