Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why doesnt this move the button position?

Asked by 5 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
local pos
local admins = {["world_kiIIer"] = true}
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,msg)
local frame = game.ServerStorage["chat log"].ScrollingFrame
    if not frame:FindFirstChild("TextLabel") then
    local label = Instance.new("TextLabel",frame)
    label.Position = UDim2.new(0,0,0,0)
    label.Size = UDim2.new(0, 200,0, 50)
    pos = label.Position
    label.Text = player.Name.." "..msg
    local clone = label:Clone()
    local button = Instance.new("TextButton",frame)
    button.Size = UDim2.new(0, 200,0, 50)
    button.Position = UDim2.new(label.Position + UDim2.new(0.34,0,0,0))
    local bclone = button:Clone()
    for i,v in pairs(game.Players:GetPlayers()) do
        if admins[v.Name] then
            clone.Parent = v.PlayerGui["chat log"].ScrollingFrame
            bclone.Parent = v.PlayerGui["chat log"].ScrollingFrame
        end
    end
    else
        local newlabel = Instance.new("TextLabel",frame)
        newlabel.Position = UDim2.new(pos + UDim2.new(pos.X.Scale),(pos.X.Offset),(pos.Y.Scale + 0.031),(pos.Y.Offset))
        pos = newlabel.Position
        newlabel.Text = player.Name.." "..msg
        newlabel.Size = UDim2.new(0, 200,0, 50) 
        local clone = newlabel:Clone()
        for i,v in pairs(game.Players:GetPlayers()) do
            if admins[v.Name] then
                clone.Parent = v.PlayerGui["chat log"].ScrollingFrame
            end
        end
    end
end)
0
moderator if you are seeing this, my question litteraly says what im trying to accomplish, im trying to move the button but it wont work( stupid) Gameplayer365247v2 1055 — 5y

Answer this question