generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: This makes no sense.

Previous Thread :: Next Thread 
dirk29 is not online. 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 is not online. 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 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
23 Nov 2012 12:28 PM
I don't get it.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. 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
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. 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 is not online. 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 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
25 Nov 2012 02:01 PM
The player still doesn't teleport.
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
25 Nov 2012 02:51 PM
Test it online
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
01 Dec 2012 09:29 PM
I did.
Report Abuse
sycips is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image