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: If and then script fix................

Previous Thread :: Next Thread 
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Jan 2013 11:50 AM
In kinda new to if and then scripts so... i made this scirpt and i need you to fix it so it works.



function
if
script.parent.parent.Humanoid.Health = 0
then
local h = Instance.new("Message")
m.Parent = Workspace
m.Test = ("you loose!")
wait(5)
m:Remove()
end
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
20 Jan 2013 11:54 AM

if script.parent.parent.Humanoid.Health == 0 then
local h = Instance.new("Message", Workspace)
h.Text = "you loose!"
wait(5)
h:Destroy()
end
Report Abuse
Taniss99 is not online. Taniss99
Joined: 15 Dec 2007
Total Posts: 1707
20 Jan 2013 11:54 AM
function --name?
if (script.parent.parent.Humanoid.Health == 0) -- = is assignment == is test condition
then
local h = Instance.new("Message")
m.Parent = Workspace
m.Test = ("you loose!")
wait(5)
m:Remove()
end


Report Abuse
Th30racle is not online. Th30racle
Joined: 03 Nov 2012
Total Posts: 214
20 Jan 2013 11:54 AM
script.Parent = workspace
This script would have to be inside a player. If it was inside a player, it would look like this:

if script.Parent.Humanoid.Health == 0 then
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Test = ("You lose!")
wait(5)
m:Remove()
end
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
20 Jan 2013 11:54 AM
ur trolling. i can tell
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
20 Jan 2013 11:54 AM
*


if script.Parent.Parent.Humanoid.Health == 0 then
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Jan 2013 11:58 AM
This script isent working...


if script.Parent.Parent.Humanoid.Health == 0 then
local h = Instance.new("Message", Workspace)
h.Text = "you loose!"
wait(5)
h:Destroy()
end
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Jan 2013 12:01 PM
sooooo no one is ganna help me? :(
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
20 Jan 2013 12:02 PM
Then you parented this wrong.

if script.Parent.Parent.Humanoid.Health == 0 then
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Jan 2013 12:04 PM
IT still dont work.........................


if script.Parent.Parent.Humanoid.Health == 0 then
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Test = ("You lose!")
wait(5)
m:Remove()
end
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
20 Jan 2013 12:06 PM
faceDesk
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Jan 2013 12:08 PM
Why face desk?
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