How do I add the TextLabel to this script in order for them to see how much lag is there? Like if it says 255, the TextLabel will say 255 and if it changes, the TextLabel will change as well. This is the script:

runService = game:service("RunService")
runService.Stepped:connect(function() frames = frames + 1 end)

frames = 0
Result = 0
Color = 0



while true do
	Result = ((frames/30) - 1) * -1
	if (Result < 0) then
		Result = 0
	end

	Color = (frames/15) * 255
	if(Color > 255)then
		Color = 255
	elseif(Color < 0)then
		Color = 0
	end
	print(Color)

	script.Parent.Mesh.Scale = Vector3.new(1,Result,1)
	script.Parent.Mesh.Offset = Vector3.new(0,(Result * 3) - 3,0)
	script.Parent.BrickColor = BrickColor.new(Color3.new(255 - Color, Color, 0))

	frames = 0
	wait(1)
end

1 comment

0

textlabel.Text = Color ???