Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Problem with changing BackgroundColor3. Any help?

Asked by 3 years ago

Hello! I was making a local script that changes backgroundcolor3 of a frame using color3. my script : (local script located in starterplayerscripts)

local frame = game.Players.LocalPlayer.PlayerGui.colors.Frame

local part = workspace.Part


frame.Parent.Enabled = true

frame.BackgroundColor3 = Color3.new(part.Color)

I also tried :

local frame = game.Players.LocalPlayer.PlayerGui.colors.Frame

local part = workspace.Part


frame.Parent.Enabled = true

frame.BackgroundColor3 = Color3.new(part.Color, part.Color, part.Color)

The problem is when I run the game the frame turns black.

I was looking for it on the internet but there was no solution anywhere. Thanks for your help :)

1 answer

Log in to vote
0
Answered by 3 years ago

https://developer.roblox.com/en-us/api-reference/property/BasePart/Color

The Color property is not replicated. Which means you can't access it via a LocalScript.

Also, doing Color3.new(part.Color) is redundant, just do part.Color.

Ad

Answer this question