3 Unable to assign property Color. Color3 expected, got BrickColor

Making a script where my sword shoots out an attack and the attack is a random colour picked which then is the sword’s blade’s colour but It results in an error which is the title.

the sword’s damage script

tool.Activated:Connect(function()
	attacking = true
	handle.UsePartColor = true
	handle.Color = script.Parent.BladeValue.Value
	wait(attackTime)
	handle.UsePartColor = false
	attacking = false
	debounce = false
end)

the script where it shoots the attack out

	local r = math.random(1,255)
	local g = math.random(1,255)
	local b = math.random(1,255)
	
	if not debounce then
		debounce = true
		star.Color = Color3.fromRGB(r, g, b)
		star.Material = "Neon"
		star.Anchored = false
		star.CanCollide = false

		local spawnPos = script.Parent.Handle.Position
		spawnPos  = spawnPos + (lookAt * 5)

		star.Name = "SoulSwordStar"

		local antiGravity = Instance.new("BodyForce")
		antiGravity.Force = Vector3.new(0, workspace.Gravity * star:GetMass(), 0)
		antiGravity.Parent = star
		star.Velocity = lookAt  * 100
		
		destroy.Parent = star
		dmg.Parent = star
		script.Parent.BladeValue.Value = star.Color
		star.Parent = workspace
		star:SetNetworkOwner((game:GetService("Players"):GetPlayerFromCharacter(character)))
		game:GetService("Debris"):AddItem(star, 10)
		star.Position = script.Parent.Parent.HumanoidRootPart.Position
		wait(0.75)
		debounce = false
	end
end)

This is the sword’s descendants/children :

image
image
Help would be appreciated thank you

You can do one of two things:
1- set handle.BrickColor instead
2- use script.Parent.BladeValue.Value.Color, BrickColors have a “Color” property that is a Color3.

2 Likes

Medium stone gray is indeed a BrickColor value. You’d rather use Color3 value. Script if you use Color3 instead:

handle.Color = Color3.new(script.Parent.BladeValue.Value)

If you want to stick with BrickColor, then:

handle.BrickColor = script.Parent.BladeValue.Value
1 Like

This just doesn’t seem to work? The value changes colour but the blade doesn’t pick up the color from it

Nevermind got it to work thank you!