I am having this error:
The Parent property of BoxGradient is locked, current parent: NULL, new parent B - Client - Menu:45**
local MenuUI = Plr.PlayerGui:WaitForChild("Menu")
local Main = MenuUI.Main
local Glow = RepStorage.Glow
local BoxGr = RepStorage.BoxGradient
local Frames = {
Main.A,
Main.B,
Main.C,
Main.D,
Main.E,
Main.F
}
for _, Frame in pairs(Frames) do
Frame:FindFirstChildWhichIsA("TextButton").MouseEnter:Connect(function()
local BoxGrNew = BoxGr:Clone()
BoxGr.Parent = Frame
BoxGr.BackgroundColor3 = Frame:FindFirstChildWhichIsA("TextButton").TextColor3
local Glow = Glow:Clone()
Glow.Parent = Frame
Glow.ImageColor3 = Frame:FindFirstChildWhichIsA("TextButton").TextColor3
Glow.Position = UDim2.new(0, Frame.AbsolutePosition.X, 0, Frame.AbsolutePosition.Y)
Glow.ImageTransparency = .7
--TweenService:Create(Frame.Glow, TweenInfo.new(.2), {ImageTransparency = .7}):Play()
TweenService:Create(Frame.BoxGradient.UIGradient, TweenInfo.new(.4), {Offset = Vector2.new(0, 0)}):Play()
end)
Frame:FindFirstChildWhichIsA("TextButton").MouseLeave:Connect(function()
Frame.Glow:Destroy()
Frame.BoxGradient:Destroy()
end)
end
i am aware what the error means but i havent been able to fix it. Any help would be awesome