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: Simple script doesn't work

Previous Thread :: Next Thread 
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
03 Jun 2013 08:25 PM
This script is supposed to add a value called Laps into the player's model whenever the player spawns or respawns. It never works and there is no output.
Report Abuse
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
03 Jun 2013 08:26 PM
whoops forgot the script


game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
print("Laps getting added")
Laps = Instance.new('NumberValue')
Laps.Parent = character
Laps.Value = 0
Laps.Name = ("Laps")
end)
end)


Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
03 Jun 2013 08:28 PM
game.Players.PlayerAdded:connect(funciton(plr)
plr.CharacterAdded:connect(function(char)
repeat wait() until char:FindFirstChild("Humanoid")
Instance.new("NumberValue",char).Name = "Laps"
end)
end)

If that doesn't work in Offline mode try Online mode.
Report Abuse
gnomeHarrisonII is not online. gnomeHarrisonII
Joined: 03 Nov 2012
Total Posts: 114
03 Jun 2013 08:28 PM
Never defined character
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
03 Jun 2013 08:29 PM
gnome, yeah he did... Moron.
Report Abuse
gnomeHarrisonII is not online. gnomeHarrisonII
Joined: 03 Nov 2012
Total Posts: 114
03 Jun 2013 08:29 PM
nvm
Report Abuse
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
03 Jun 2013 08:33 PM
@Ceaseless Soul
When i replaced my script with your script output told me this " expected (to close '(' at line 1) near 'plr" but on the bright side my script screwed up so other scripts in my game and now they're working again with yours so your definately closer than i am
Report Abuse
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
03 Jun 2013 08:35 PM
oh you mis spelld function and i copied it into my script
Report Abuse
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
03 Jun 2013 08:36 PM
I fixed it but now I don't have any output and the script doesn't work, just like before
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
03 Jun 2013 08:39 PM
Try online mode...
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