Its giving me an error that says unable to cast int to int please help,
local button = script.Parent
button.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local character = player.Character
if character and character:FindFirstChild("Torso") then
character.Torso.BrickColor = BrickColor.new(button.BackgroundColor.Color)
end
end)
12:31:21.736 Players.treeisnotcool.PlayerGui.colorGamepass.colorFrame.ScrollingFrame.white.Script:5: attempt to index nil with 'Character' - Server - Script:5 gave me this error
local button = script.Parent
button.MouseButton1Click:Connect(function()
local player = button.Parent.Parent.Parent.Parent.Parent
local character = player.Character
if character and character:FindFirstChild("Torso") then
character.Torso.BrickColor = BrickColor.new(button.BackgroundColor.Color)
end
end)