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

" Expected Identifier, got '=' " error. Help?

Hey people of the internet, Can someone help me figure out what is going wrong here? What should I do to make it so that when the transparency is 0, it stops counting down the transparency? Am I just failing to use this or what? I can assure you everything else works, except maybe for a placement of the 'end'.

The error in the console is 23:34:45.097 - Players.lulukitty22.PlayerGui.A-Chassis Interface.Temperature.EngineOverheat:78: unexpected symbol near '='

Here is the piece of script that is breaking. I can also assure you that it is spaced out line by line correctly, it just does not display right for some reason in the code block. It errors just under the wait(.2) until (which is ls line 78 on the script.) I am assuming whatever the problem with the first line is, it goes for the following lines.

function FireTrue() repeat car.Body.FireEffect.Fire.Transparency = car.Body.FireEffect.Fire.Transparency - 0.1 car.Body.FireEffect.Fire2.Transparency = car.Body.FireEffect.Fire2.Transparency - 0.1 car.Body.FireEffect.Smoke.Transparency = car.Body.FireEffect.Smoke.Transparency - 0.1 car.Body.Fire2Effect.Fire.Transparency = car.Body.Fire2Effect.Fire.Transparency - 0.1 car.Body.Fire2Effect.Smoke.Transparency = car.Body.Fire2Effect.Smoke.Transparency - 0.1 wait(.2) until car.Body.FireEffect.Fire.Transparency = 0 car.Body.FireEffect.Fire2.Transparency = 0 car.Body.FireEffect.Smoke.Transparency = 0 car.Body.Fire2Effect.Fire.Transparency = 0 car.Body.Fire2Effect.Smoke.Transparency = 0 end

Thanks in advance! -Lulu

1 comment

1

use code block not inline code.

1 answer

Line: wait(.2) until car.Body.FireEffect.Fire.Transparency = 0

Should be: wait(.2) until car.Body.FireEffect.Fire.Transparency == 0

also perhaps try:

function FireTrue() 
	local PartList = {car.Body.FireEffect.Fire, car.Body.FireEffect.Fire2, car.Body.FireEffect.Smoke, car.Body.Fire2Effect.Fire, car.Body.Fire2Effect.Smoke}
	local loop = true
	while loop == true do
		loop = false
		for _,value in pairs(PartList) do
			if value.Transparency > 0.1 then 
				loop = true
				value.Transparency = value.Transparency - 0.1
			else
				value.Transparency = 0
			end
		end
		wait(.2)
	end
end

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