Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 comments

0

Is this script a LocalScript?

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.

1 answer

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.

1 comment

0

Nope

This discussion is preserved as it was. New answers, comments, and votes are closed.