Changing ScreenGUI Frame color w/ LocalScript

Good morning/afternoon!

So I have no idea why this is not working lol. I want to change a ScreenGUI Frame’s color using a LocalScript. The LocalScript would be activated by a ScreenGUI Button.

LocalScript:

local Frame = script.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
Frame.BackgroundColor3 = Color3.new(47/255, 47/255, 47/255)
end)

Why is this not working?

Is this a typo or a mistake in your script?

oh whoops lol! That is a typo! I just wrote the lines of code. I did not copy it from my script!

Also, just so those mistakes won’t happen again I recommend you review your code before posting it in Scripting Support :slightly_smiling_face:

1 Like

My bad. Thanks for letting me know <3

1 Like

Strange, works fine for me. Are there any errors?

Oh never-mind! I fixed it! I do not know why I did not think of this. Lol I have the variable destination incorrect. Thank you all for helping anyway!