nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
|
| 31 Jul 2015 03:19 PM |
attempt to index global 'player' (a nil value)
i marked the line of the error and this is the script:
-- going to see if this one is better
wait(10)
while true do wait(5) players = game.Players.NumPlayers games = game.ServerStorage.Games:GetChildren() player = game.Players.LocalPlayer val = game.Workspace.Topval
if players >= 1 then wait(1) rangame = math.random(1, #games) minigamech = games[rangame] minigamec = minigamech:Clone() minigamec.Parent = game.Workspace spawns = minigamec.Spawns:GetChildren() for i, v in pairs(game.Players:GetChildren()) do Pame = v.Name checkName = game.Workspace:FindFirstChild(Pame) if checkName then checkHumanoid = checkName:FindFirstChild("Humanoid") if checkHumanoid then checkName:MoveTo(spawns[i].Position) end end end wait(2.2) pie = game.Lighting.Winner:clone() pie.Parent = player for i = 9, 6, -1 do game.Workspace.Topval.Value = "Time Left "..i wait(1) end if player.Winner then -- THIS IS THE LINE done = math.random(10,50) player.stats.cash.Value=player.stats.cash.Value+(done) for i = 5, 1, -1 do game.Workspace.Topval.Value = "Time Left "..i wait(1) end game.Workspace.Topval.Value = "Time Left "..i else
end minigamec:remove() end
end
|
|
|
| Report Abuse |
|
|
nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
| |
|
|
| 31 Jul 2015 03:26 PM |
You're using LocalPlayer in a serverscript.
Did you even make this script?
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|
nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
|
| 31 Jul 2015 03:27 PM |
| Yes i did but can i not use localplayer in it? |
|
|
| Report Abuse |
|
|
nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
| |
|
nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
| |
|
nicebros
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 102 |
|
| |
|
|
| 31 Jul 2015 04:01 PM |
'game.Players.LocalPlayer' cannot be used inside of a server script.
If money grew on trees... It would be as valuable as leaves. | Twitter: @TwisterRBLX |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 31 Jul 2015 04:05 PM |
| i'm a fairly new scripter, but i dont think you can do local scripts. but if you can the issue might be the .Winner it might need to be = Winner or Winner = true |
|
|
| Report Abuse |
|
|