dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Nov 2012 12:16 PM |
I have a leaderboard,
game.Players.ChildAdded:connect(function(newPlayer) local s = Instance.new("BoolValue") s.Name = "Run" s.Value = false
s.Parent = newPlayer end)
I have this script then,
script.Parent.Touched:connect(function(hit) if hit:IsA("Part") then if hit.Name == "Ball" then if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Jump = true hit.Parent:MoveTo(game.Workspace.Lobby.Spawns.Tp.Position + Vector3.new(0,3,0)) Plr = hit.Parent.Name game.Players[Plr].leaderstats.XP.Value = game.Players[Plr].leaderstats.XP.Value + math.random(10000,30000) game.Players[Plr].Run = false <----line 9 hit:Remove() end end end end)
Heres the output. It makes no sense.
13:15:42 - Run is not a valid member of Player 13:15:42 - Script "Workspace.Lvl1.EndBrick.Script", Line 9 13:15:42 - stack end |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Nov 2012 12:19 PM |
| There's more to my leaderboard. I just put that part. |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
| |
|
|
| 23 Nov 2012 12:37 PM |
Are you testing in Test Server/Test Player or are you using Play Solo?
¬ SHG Scripter Tier-2 ♣ LuaLearners Elite |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Nov 2012 01:08 PM |
| I'm using Play Solo to test it. I'm thinking the problem may be because I didn't put .Value at the end. I always forget that for some reason. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2012 01:11 PM |
I think the problem is that you're using Play Solo. Test it in Test Player/Test Server and see what happens.
¬ SHG Scripter Tier-2 ♣ LuaLearners Elite |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2012 01:12 PM |
You're right, actually, you didn't add .Value at the end. But you still won't be able to test in Play Solo.
¬ SHG Scripter Tier-2 ♣ LuaLearners Elite |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 24 Nov 2012 02:47 AM |
| Yes I did. It works. Now in Play Solo, it teleports the player back. In online, it doesn't. |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 24 Nov 2012 04:07 AM |
Replace the line with plr = with this:
Plr = game.Players:findFirstChild(hit.Parent.Name) |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 25 Nov 2012 02:01 PM |
| The player still doesn't teleport. |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
| |
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
| |
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 02 Dec 2012 08:22 AM |
| Well the fould isnt in this script but in another script I quess... The object "Run" can't be found so its not created... Why not? Idk you have to answer that question... |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 02 Dec 2012 08:37 AM |
| It all works. It's that script because that script teleports the character. |
|
|
| Report Abuse |
|
|