Hi. I'm making a game with cats. You can customize their colour. The output doesn't say anything but the color is not changing. I know some things are very weird in the code, but the only problem is color = BrickColor.new("White")
Here is the code:
local playername = script.Parent.Player.Value
local player = game.Players:FindFirstChild(""..playername.."")
local leaderstatscolor = player:WaitForChild("leaderstats"):WaitForChild("Color")
local color = script.Parent.BrickColor
local colors = {"Gray" or "White"}
while true do
local leaderstatscolor = player.leaderstats.Color
wait(1)
if leaderstatscolor.Value ~= "Gray" and leaderstatscolor.Value ~= "White" then
print(leaderstatscolor.Value)
leaderstatscolor.Value = "Gray"
color = BrickColor.new("Dark stone grey")
else
if leaderstatscolor.Value == "White" then
print("Debug 2")
color = BrickColor.new("White")
--[[ if level.Value >= 3 then
size = "4.612, 5.541, 6.236"
end--]]
end
end
end
here is the movement script ---> pet:
local bodyPos = Instance.new("BodyPosition", newPet)
bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
local bodyGyro = Instance.new("BodyGyro", newPet)
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
while wait() do
bodyPos.Position = humRootPart.Position + Vector3.new(2, 2, 3)
bodyGyro.CFrame = humRootPart.CFrame
end
hope someone can help! :)
Yuri

3 comments
Thanks a lot! I'll try it.
It worked! Thank you so much!
No problem.