|
| 19 Mar 2017 03:27 PM |
It's always doing the else part of the function.
This function is run multiple times so it's designed so that if the player already has a cam, it disables/re-enables it quickly, but if they don't have it, it inserts it into them.
function cam2() local people = game.Players:GetChildren() for i = 1, #people do if people[i]:FindFirstChild("cam1") then people[i].Character.cam1.Disabled = true wait(0.005) people[i].Character.cam1.Disabled = false else game.Lighting.cam1:clone().Parent = people[i].Character wait() people[i].Character.cam1.Disabled = false end
end end |
|
|
| Report Abuse |
|
|
XCVlll
|
  |
| Joined: 23 Oct 2008 |
| Total Posts: 963 |
|
|
| 19 Mar 2017 03:29 PM |
replace if people[i]:FindFirstChild("cam1") then with
if people[i].Character:FindFirstChild("cam1") |
|
|
| Report Abuse |
|
|
XCVlll
|
  |
| Joined: 23 Oct 2008 |
| Total Posts: 963 |
|
|
| 19 Mar 2017 03:30 PM |
| i forgot to put then at the end but you get the idea |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2017 03:31 PM |
| how did I miss that, I'm silly.. thank you! |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2017 03:33 PM |
You parent cam1 to people[i].Character
but then look for it in people[i]
It will never be there.
|
|
|
| Report Abuse |
|
|