You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I’m working on a moderation system for my game and I made a datastore system for all the moderator actions and now I want to be able to get the all the actions that have been taken on a user and display the data I saved on a GUI
-
What is the issue? It just doesnt work at all and with how this script currently is it even gives me an error
attempt to concatenate string with Instance
This is the script that I made and it’s a server script.
local DS = game:GetService("DataStoreService"):GetDataStore("DS_modLog2", "Warnings")
local Players = game:GetService("Players")
game:GetService("ReplicatedStorage").GetData.OnServerEvent:Connect(function(UserID)
local key = "Log_"..UserID
local playerMod
local success, err = pcall(function()
playerMod = DS:GetAsync(key)
end)
for rank, data in ipairs(playerMod) do
local c = script.Parent.ScrollingFrame.Template.Log:Clone()
c.Reason.Text = data[4]
c.Moderator.Text = "Issued by: "..data[2].."("..data[3]..")"
c.Avatar.Image = "rbxthumb://type=AvatarHeadShot&id="..data[3]:GetUserIdFromNameAsync(script.Parent.Input.Text).."&w=352&h=352 true false"
c.Parent = script.Parent.ScrollingFrame
c.Visible = true
end
end)