I’ll need to see the button’s Logs.Mainscript to be able to spot the issue
Actually if this is the Logs.Mainscript I think I found the issue, here its written .. targetPlayer
:
local function updateBanLogs(banData)
for _, banInfo in ipairs(banData) do
if not banInfo then continue end
print("banInfo:", banInfo)
print("banInfo.TargetPlayer:", banInfo.TargetPlayer)
local newLog = Template:Clone()
newLog.Parent = BanLogsScrollingFrame
newLog.Name = banInfo.TargetPlayer
newLog.TargetUsername.Text = "Target: " .. banInfo.TargetPlayer
newLog.AdminUsername.Text = "Admin: " .. banInfo.AdminName
newLog.BanReason.Text = "Reason: " .. banInfo.Reason
newLog.Select.MouseButton1Click:Connect(function()
targetPlayer = banInfo.TargetPlayer
UnBanFrame.Visible = true
UnBanFrame.Reason.Text = "Unban reason for " .. targetPlayer
end)
end
end
Instead of .. banInfo.TargetPlayer
:
local function updateBanLogs(banData)
for _, banInfo in ipairs(banData) do
if not banInfo then continue end
print("banInfo:", banInfo)
print("banInfo.TargetPlayer:", banInfo.TargetPlayer)
local newLog = Template:Clone()
newLog.Parent = BanLogsScrollingFrame
newLog.Name = banInfo.TargetPlayer
newLog.TargetUsername.Text = "Target: " .. banInfo.TargetPlayer
newLog.AdminUsername.Text = "Admin: " .. banInfo.AdminName
newLog.BanReason.Text = "Reason: " .. banInfo.Reason
newLog.Select.MouseButton1Click:Connect(function()
targetPlayer = banInfo.TargetPlayer
UnBanFrame.Visible = true
UnBanFrame.Reason.Text = "Unban reason for " .. banInfo.TargetPlayer
end)
end
end