So, If the pet’s rainbow value is true, then i want the game to clone a script to the pet’s highlight to show that it’s rainbow. However, when cloning this script to the pet and enabling the bool in it, it does not function. Why does this happen? Here is the code:
while script.Nable.Value do -- bool that the game enables with the clone
wait(0.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(255, 0, 0)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(255, 155, 0)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(255, 255, 0)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(0, 255, 0)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(0, 255, 255)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(0, 155, 255)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(255, 0, 255)}):Play()
wait(1.1)
game:GetService('TweenService'):Create(
script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
{FillColor = Color3.fromRGB(255, 0, 155)}):Play()
wait(1.1)
end
Code that activates it:
function stylepet(pet, model)
if pet.Shiny.Value == true then
model.Highlight.FillColor = Color3.fromRGB(255, 255, 255)
model.Head.Middle.Shiny.Enabled = true
model.Highlight.Enabled = true
end
if pet.Gold.Value == true then
for _, Part in pairs(model:GetDescendants()) do
if Part:IsA("BasePart") then
Part.Material = Enum.Material.Foil
end
end
model.Highlight.FillColor = Color3.fromRGB(255, 191, 0)
model.Highlight.Enabled = true
end
if pet.Rainbow.Value == true then
model.Highlight.FillColor = Color3.fromRGB(255,255,255)
local rb = script.RB:Clone()
rb.Parent = model.Highlight
rb.Nable.Value = true
model.Highlight.Enabled = true
end
end
Any help would be appreciated, I seriously have no idea what to do!