Fatalizer
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 1520 |
|
|
| 16 Jul 2014 09:24 AM |
I got this script;
game.Players.PlayerAdded:connect(function(p) M = Instance.new("Message", Workspace) Hum = Players.findFirstChild("Humanoid") if Hum.Health = 0 then M.Text = Oh no, someone has died ! end end)
There is a error at line 4 ( if Hum.Health = 0 then ) Could someone make a fix for this? |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Jul 2014 09:30 AM |
if Hum.Health == 0 then
Use == when comparing |
|
|
| Report Abuse |
|
|
Fatalizer
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 1520 |
|
|
| 16 Jul 2014 09:34 AM |
Thanks !
Can I make it like;
game.Players.PlayerAdded:connect(function(p) M = Instance.new("Message", Workspace) M.Text = "" Hum = Players.FindFirstChild("Humanoid") if Hum.Health == 0 then M.Text = "Player.name .. Has died !" end end)
Too? Or is it a bad script I made ? |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2014 09:38 AM |
-- Try this
local message = Instance.new("Hint",workspace)
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() message.Text = p.Name.." has died!" wait(3) message.Text = "" end) end) end) |
|
|
| Report Abuse |
|
|
Fatalizer
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 1520 |
|
|
| 16 Jul 2014 09:46 AM |
Thanks !
This gave me an idea, I want it like a admin so how do I do that? I know you need _, and inPairs But I don't know how to use it, please help me?
|
|
|
| Report Abuse |
|
|