Hi all!
My buttons for the billboardgui do not get created 50% of the time for whatever reasons. Any help is appreciated!
local BillboardGui = PlayerGui:WaitForChild("SellOptions");
BillboardGui.Adornee = SellNPC:WaitForChild("HumanoidRootPart"); --For whatever reason it doesn't work unless I add this
script.UIListLayout.Parent = BillboardGui;
for Number, Text in pairs(SellOptions) do
local Clone = script.Button:Clone();
Clone.Number.Text = string.format("#%s", Number);
Clone.TextLabel.Text = string.format("%s", Text);
Clone.Name = Number;
Clone.Parent = BillboardGui;
local HoverTween = TweenService:Create(
Clone.TextLabel,
TweenInfo.new(0.5),
{
Position = UDim2.new(0.1,0,0,0);
}
);
local UnhoverTween = TweenService:Create(
Clone.TextLabel,
TweenInfo.new(0.25),
{
Position = UDim2.new(0.05,0,0,0);
}
);
Clone.MouseButton1Click:Connect(function()
SellFunctions[Number]();
end);
Clone.MouseEnter:Connect(function()
HoverTween:Play();
end);
Clone.MouseLeave:Connect(function()
UnhoverTween:Play();
end);
end
** You are now Level 12! **
reaction for more information.