Is the SurfaceGui adorned and parented to the part prior to you testing the game? Because if that’s the case, you must move it to the StarterGui and adorn it to the part from there.
Ah it would appear that in the line where you state the BackgroundColor3, you missed one number within the Color3.new(). If you put in the 4th one it should work.
That’s odd. I just tested it your code out on a new place and it works fine for me.
In the script.Parent variable, is it referring directly to the frame you want the color to change for? That’s all I can think of if it still isn’t working.
Yeah, I’m using a SurfaceGUI. I made sure to parent it to the StarterGUI and then adorn it to a part in Workspace. Then I copy and pasted your script into a LocalScript parented to a Frame in the SurfaceGUI. I can send a place download if you like.
In this example, I’ve put a SurfaceGUI in the StarterGUI and adorned it to the Baseplate. The LocalScript containing your code is parented to a Frame in the SurfaceGUI.