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
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 04 Jun 2014 04:40 AM |
| Connectionlinenoutside function k |
|
|
| Report Abuse |
|
|
Zecrit
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 2618 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 2618 |
|
|
| 04 Jun 2014 04:48 AM |
"Crashing a script"
ParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoiaParanoia
Thanks :P |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
Zecrit
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 2618 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|