local player = game.Players.LocalPlayer local car = script.Parent.Car.Value local Seat = car.DriveSeat local Beep = script.Beep local Note = script.Parent.Note while true do if Seat.Fuel.Value < 0.1 then Beep.Playing = true Note.Visible = true Note.Text = "'You are out of fuel "..(player.name)..",try roll to the pit!'" elseif Seat.Fuel.Value < 5 then wait(10) Beep.Playing = true Note.Visible = true Note.Text = "'You are nearly out of fuel "..(player.name)..",consider filling up bruh'" wait(2) Note.Visible = false elseif Seat.Health.Value < 100 then Beep.Playing = true wait(10) Note.Visible = true Note.Text = "'The kart is highly damaged "..(player.name)..",consider pitting up bruh'" wait(2) Note.Visible = false elseif Seat.Fuel.Value > 0 then Note.Visible = false end wait(0.1) end
Beep is inside this script and its in a GUI, It works in studio though
If something works in Studio's Play Solo testing but not in a live game or in Test Server, it's almost always because Play Solo does not separate the client from the server. I recommend using Test Server when you need to test that stuff.
You should try to use the Value.Changed
event instead of using a loop.
Use a LocalScript
for all client-side code, I suspect you are using a Script
here.