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: How do I insert values into a person?

Previous Thread :: Next Thread 
Zecrit is not online. Zecrit
Joined: 24 Jan 2013
Total Posts: 2618
04 Jun 2014 04:37 AM
I thought this would work:

function playerEntered(player)
local Inf = Instance.new("BoolValue", player)
Inf.Name = "Infected"
local Dam = Instance.new("NumberValue", player)
Dam.Name = "Damage"
local Fi = Instance.new("NumberValue", player)
Fi.Name = "FireSpeed"
player.Changed:connect(function(property)
if (property == "Character") then
playerSpawned(player)
end
end)

game.Players.ChildAdded:connect(playerEntered)
end

Inserting them into the Player in the Players tab so they don't get removed when they die also.
Please excuse my stupidity but I only just began to try lua yesterday.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:39 AM
PlayerAdded...
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:40 AM
Connectionlinenoutside function k
Report Abuse
Zecrit is not online. Zecrit
Joined: 24 Jan 2013
Total Posts: 2618
04 Jun 2014 04:42 AM
not k
me 2 stoopid
:c
Report Abuse
nomer888 is online. nomer888
Joined: 13 Feb 2010
Total Posts: 551
04 Jun 2014 04:42 AM
@Vlek - ChildAdded should work fine since it passes the instance added, which would only be a player.

Have you tried using an anonymous function to call it?

game.Players.ChildAdded:connect(function(player) playerEntered(player) end)
Report Abuse
Zecrit is not online. Zecrit
Joined: 24 Jan 2013
Total Posts: 2618
04 Jun 2014 04:43 AM
Oh this is something else now Nomer :P

Have I used Entered when it should be Added?...
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:44 AM
G = Instance.new("BoolValue")
G.Parent = game.Players
G.Name = "Crashing a script..."
G.Value = true
Report Abuse
Zecrit is not online. Zecrit
Joined: 24 Jan 2013
Total Posts: 2618
04 Jun 2014 04:48 AM
"Crashing a script"

ParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoia

Thanks :P
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:48 AM
To who lol
Report Abuse
Zecrit is not online. Zecrit
Joined: 24 Jan 2013
Total Posts: 2618
04 Jun 2014 04:49 AM
You
C:
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:58 AM
Kthx c:
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