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

Why does this not work in game with FE enabled?? Help pls everytime i try in game it doesnt work

Asked by 6 years ago
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

0
Is this script a LocalScript? ax_gold 360 — 6y
0
First of all we need to know is you use a localscript or normal script, next thing you need to learn is using events thats what helps with FE games. Lualaxy 78 — 6y

1 answer

Log in to vote
0
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago

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.

0
Nope aleandroblingo -35 — 6y
Ad

Answer this question