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

Make it so if your underwater riding a boat you run out of oxygen?

Asked by 2 years ago

So if your boat is flipped upside down make it so you lose oxygen until you exit the seat and swim up to the surface

01local bar = script.Parent.BarBG.Bar
02local oxygenLabel = script.Parent.BarBG.OxygenAmount
03 
04local maxOxygen = 100
05local currentOxygen = maxOxygen
06 
07local timePerLoss = 0.3
08local chairwater = false
09local isSwimming = false
10 
11local char = game.Players.LocalPlayer.Character
12local hum = char:WaitForChild("Humanoid")
13 
14 
15hum.StateChanged:Connect(function(oldState, newState)
View all 62 lines...
0
This isn't a question? iiDev_Hunt3r 64 — 2y
0
it is a question SpriteGamerHD 47 — 2y
0
also if the question dosent make sense basically if your boat tips upside down it dosent take away oxygen until you exit the chair SpriteGamerHD 47 — 2y
0
This is more of a script request than a question ScriptGuider 5640 — 2y
0
line 27 to line 34 SpriteGamerHD 47 — 2y

Answer this question