Changed event fires whenever a change happens to your instance. Now what do you think happens when you tell a loop to run infinite amounts of times? Yes, it will crash.Īlso, the. Loops run really fast, for example you can have a for loop do 100 cycles in just a single frame. That while loop is going to yield your code until it finishes, and since there is no finish, it will just crash your game completely. If .Name = "Passenger Seats" thenįirst off, this is not how loops work. If = math.huge then -God(Same as full health color but with infinity health)Ĭ:Connect(function() However this didn’t work as well and now i am lost. I tried to solve this by checking if a Car variable is true in a while loop before doing the :connect, and set the Car variable to true when the player’s humanoid is detected seated. I put a :connect(function() to do stuff with the GUI after detecting health change, however, this wouldn’t work because Car is not defined yet because the player is not in any vehicle. I am trying to make a GUI that displays the health of a vehicle by using a humanoid.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |