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: Easy script help

Previous Thread :: Next Thread 
Fatalizer is not online. 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
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
16 Jul 2014 09:29 AM
if Hum.Health >= 0 then
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
16 Jul 2014 09:30 AM
if Hum.Health == 0 then

Use == when comparing
Report Abuse
Fatalizer is not online. 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
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
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 is not online. 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
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