You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want my list to NOT keep making its way down the side of the screen. I want it all to stay in the same spot (top left corner of the screen) and look like an actual list that updates.
-
What is the issue? My script keeps making my list move down the screen slowly.
-
What solutions have you tried so far? I have tried revamping it many times and I have tried to get it to function correctly different ways.
IN A LOCAL SCRIPT:
wait(2)
print("Staarting")
--LocalScript.
local newfolder = Instance.new("Folder")
newfolder.Name = "Input"
newfolder.Parent = script.Parent
newfolder.DescendantAdded:Connect(function(obj)
if #newfolder:GetChildren() > 5 then --fix the damn position.
local one = newfolder:FindFirstChild("1")
local two = newfolder:FindFirstChild("2") --we are gonna need the second chat label as well
two:TweenPosition(UDim2.new(0.02,0,0.06,0), "Out", "Quint") --slide the label to the correct spot in the chat frame.
one:Destroy() --destroy the first one
for nam,obj in pairs(newfolder:GetChildren()) do --get the rest of the main folder
obj.Name = nam --re-number everthing
end
end
for i = 1, #newfolder:GetChildren(), 1 do --Get the children of the main folder.
local label1 = newfolder:FindFirstChild(tostring(i))
if i == 1 then
local homePos = UDim2.new(0.02,0,0.06,0) --Starting position 1 for the first chat message.
if label1.Position ~= homePos then
label1.Position = homePos
end
else
local label2 = newfolder:FindFirstChild(tostring(i-1)) --find the pervious label
if label2 ~= nil then
local Line2 = label2:FindFirstChild("Line2") --
if Line2 then --IF the second line is visible then
label1:TweenPosition(UDim2.new(label2.Position.X.Scale, label2.Position.X.Offset, label2.Position.Y.Scale + 0.08, label2.Position.Y.Offset), "Out", "Quint") --slide the label to the correct spot in the chat frame.
else --elsee
label1:TweenPosition(UDim2.new(label2.Position.X.Scale, label2.Position.X.Offset, label2.Position.Y.Scale + 0.07, label2.Position.Y.Offset), "Out", "Quint") --slide the label to the correct spot in the chat frame.
end
end
end
end
end)
local pos = 0;
while true do
wait(3)
pos = pos + 1
local newLabel = Instance.new("TextLabel")
newLabel.Name = tostring(pos)
newLabel.Text = tostring(pos)
newLabel.Size = UDim2.new(0.1,0,0.03,0)
newLabel.Position = UDim2.new(0.02,0,0.06,0)
local line2Chance = math.random(1,2)
if line2Chance == 2 then
local line2 = Instance.new("TextLabel")
line2.Name = "Line2"
line2.Position = UDim2.new(0.5, 0, 1.03, 0)
line2.Size = UDim2.new(0.1,0,0.03,0)
line2.Visible = true
line2.Text = "99"
line2.Parent = newLabel
end
newLabel.Parent = newfolder
end
How can I make this work correctly. It keeps doing this dumb crap:
Label Test.rbxl (24.3 KB)