|
| 26 Mar 2016 08:01 PM |
I want to know how I can make a number value change when your character gets killed, and I want to know how I can teleport the player to a different place when a value reaches a certain number (it would probably have something to do with if then statements but I am new to cross-game scripting)
ALSO, how do I get values to stay the same across different places linked to the same game?
please help, and THANKS |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 08:07 PM |
local health = game.Players.LocalPlayer.Character.Humanoid.Health
if health == 0 then game.Value.Value = 999 end
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 08:13 PM |
I got that one down, but how do I cause an event to happen with an if then statement? usually when I use if then's they only check once. How can I make it so it is always checking what the script says?
(example) if game.Lives.Value == 0 then Something something gameover screen yada yada yah
usually it only checks once, and if the value DOES get to 0, it does nothing because the script was ran. How can I use repeats to fix that? |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 08:14 PM |
while wait() do if game.Lives.Value == 0 then Something something gameover screen yada yada yah end |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 26 Mar 2016 08:17 PM |
| look into the .changed event on the wiki |
|
|
| Report Abuse |
|
|