Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I keep overhead BillBoardGUI after player dies?

Asked by 4 years ago

What I am trying to do?

  • I am trying to make it so when you touch a part you get a BillBoardGUI above your head but the part also kills you

What I have tried?

  • I have tried making a while loop to see if player health is 0 and if it is 0 it will wait 5 seconds for player to load then makes the BillBoardGUI again

What I have tried script:

01local DemonPart = script.Parent
02local db = false
03 
04DemonPart.Touched:Connect(function(hit)
05    if hit.Parent:FindFirstChild("Humanoid") then
06        if db == false then
07            db = true
08            print(db)
09 
10            local hitplayer = hit.Parent
11            local player = game.Players.LocalPlayer
12             hitplayer.Humanoid.Health = 0
13 
14 
15 
View all 63 lines...

What I did after it didn't work?

  • I removed the if player health = 0 because I thought there was an easier way

What is my script now?

01local DemonPart = script.Parent
02local db = false
03 
04DemonPart.Touched:Connect(function(hit)
05    if hit.Parent:FindFirstChild("Humanoid") then
06        if db == false then
07            db = true
08            print(db)
09 
10            local hitplayer = hit.Parent
11            local player = game.Players.LocalPlayer
12             hitplayer.Humanoid.Health = 0
13 
14 
15 
View all 39 lines...

Answer this question