|
| 10 Apr 2015 10:44 PM |
I've been getting a strange problem, it keeps saying Teli is not a valid member of Camera, it's not even a localscript.
level = "1" game.Players.PlayerAdded:connect(function(player) if player:WaitForDataReady() then local ls = Instance.new("IntValue") ls.Name = "Leaderstats" ls.Parent = player local score = Instance.new("IntValue") score.Name = "Score" score.Parent = ls score.Value = player:LoadNumber(level) local m = game.ReplicatedStorage.BillboardGui:Clone() m.Parent = player.Character.Head m.TextLabel.Text = "Level " .. player:LoadNumber(level) if player:LoadNumber(level) == 1 then m = game.ReplicatedStorage.Screeny:Clone() m.Parent = player.PlayerGui end end end) function Find() for i,v in pairs(game.Workspace:GetChildren()) do if v:IsA("Model") and v:FindFirstChild("Buttons") ~= nil and v:FindFirstChild("Humanoid") ~= nil then if v.Buttons.Value > 1 then print("Found") if game.Players:GetPlayerFromCharacter(v) ~= nil then game.Players:GetPlayerFromCharacter(v).Leaderstats.Score.Value = game.Players:GetPlayerFromCharacter(v).Leaderstats.Score.Value + 1 print("Getting Character") v.Head.BillboardGui.TextLabel.Text = "Level " .. game.Players:GetPlayerFromCharacter(v).Leaderstats.Score.Value v.Buttons:Remove() local m = Instance.new("NumberValue") m.Name = "Teli" m.Value = game.Players:GetPlayerFromCharacter(v).Leaderstats.Score.Value m.Parent = v print("Making Teli") end end end end end function Work() for i,v in pairs(game.Players:GetChildren()) do if v:FindFirstChild("Save") ~= nil then v.Leaderstats.Score.Value = 1 v:SaveNumber(level, 1) v:FindFirstChild("Save"):Remove() end end end game.Players.PlayerRemoving:connect(function(plyer) plyer:SaveNumber(level, plyer.Leaderstats.Score.Value) end) while true do Find() Work() wait() end |
|
|
| Report Abuse |
|
|
BetaBlaze
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 406 |
|
|
| 10 Apr 2015 11:51 PM |
> it keeps saying Teli is not a valid member of Camera
Please show us the code causing this issue. The code you pasted above is not what is causing that error. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 12:34 AM |
There is another script, but I'm pretty sure it's not causing it as well
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 11 Apr 2015 12:48 AM |
In your code obviously the script thinks you are trying to get the properties/objects of the camera
Camera.Teli apparently doesn't not exist in your code. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 03:58 AM |
| I haven't made any local scripts using the camera in the game I tested it in. |
|
|
| Report Abuse |
|
|
BetaBlaze
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 406 |
|
|
| 11 Apr 2015 09:58 AM |
Yeah but did you make any local scripts that use this?
for i,v in pairs(game.Workspace:GetChildren()) do
Because Camera is one of the items that comes up in Workspace:GetChildren() |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 10:04 AM |
| @above The server has a Camera too, so it could be a Script's fault lol. |
|
|
| Report Abuse |
|
|
BetaBlaze
|
  |
| Joined: 27 Aug 2013 |
| Total Posts: 406 |
|
|
| 11 Apr 2015 10:05 AM |
Camera isn't a model.
> for i,v in pairs(game.Workspace:GetChildren()) do > if v:IsA("Model") and v:FindFirstChild("Buttons") ~= nil and v:FindFirstChild("Humanoid") ~= nil then
So there's either another script or localscript using this loop which doesn't do the proper checks. |
|
|
| Report Abuse |
|
|