i want to make it so that the script will get the color of what the dummy is before it changes color but it says this is invalid help me i want to make a ice scythe
Handle.Touched:Connect(function(bit)
if bit.Parent:FindFirstChild("Humanoid") and bit.Parent ~= Tool.Parent then
if Debounce == true then
if bit.Parent:FindFirstChild("Humanoid").Health >=1 then
if dbb == true then
wait(1)
dbb = false
color = bit.Parent.Head.BrickColor
local sound = game.ReplicatedStorage.Freeze:Clone()
sound.Parent = bit
sound:Play()
bit.Parent.Head.BrickColor = BrickColor.new("Electric blue")
bit.Parent.Torso.BrickColor = BrickColor.new("Electric blue")
bit.Parent["Left Arm"].BrickColor = BrickColor.new("Electric blue")
bit.Parent["Right Arm"].BrickColor = BrickColor.new("Electric blue")
bit.Parent["Right Leg"].BrickColor = BrickColor.new("Electric blue")
bit.Parent["Left Leg"].BrickColor = BrickColor.new("Electric blue")
bit.Parent:FindFirstChild("Humanoid").WalkSpeed = bit.Parent:WaitForChild("Stats").Walkspeed.Value *0.8
bit.Parent:WaitForChild("Stats"):WaitForChild("IsSlow").Value = true
wait(5)
bit.Parent.Head.BrickColor = BrickColor.new(color)
bit.Parent.Torso.BrickColor = BrickColor.new(color)
bit.Parent["Left Arm"].BrickColor = BrickColor.new(color)
bit.Parent["Right Arm"].BrickColor = BrickColor.new(color)
bit.Parent["Right Leg"].BrickColor = BrickColor.new(color)
bit.Parent["Left Leg"].BrickColor = BrickColor.new(color)
bit.Parent:WaitForChild("Stats"):WaitForChild("IsSlow").Value = false
bit.Parent:FindFirstChild("Humanoid").WalkSpeed = bit.Parent:WaitForChild("Stats").Walkspeed.Value
wait(5)
dbb = true
end
end
end
end
end)

1 comment
You've written BrickColor.new(BrickColor). This is contradictory. Assign with "color" directly.