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

How can I create a wanted list to my game?

Asked by 4 years ago

Hello, I'm pretty new in Roblox scripting. I have created a game, but now I'm at the point where I want to create a wanted list. So I thought about it. I want that the people in the cop team can put the criminals on a list. That's basically it, but I have no idea how I should do that. Thanks, GlobixLP

2 answers

Log in to vote
0
Answered by 4 years ago

Each time the criminal successfully's robs a place, give them a point, sort out the points from greatest to least, then add the scores to a table, An example of a table local Table = {} would be that, if you didn't know. Then, let's make our wanted list visible. Create a part of the size you want, then insert a SurfaceGui with a scrolling frame, resize it to make it fit the board. Now, insert a UILayout (like uigridlayout.) Finally, add each value of the table to the ScrollingFrame. That's all I'm gonna tell you, If you need any other help, please let me know.
Regards, Vivilian9

0
Thanks, you helped a lot! GlobixLP 6 — 4y
0
Np! Glad I can help. ViviTheLuaKing 103 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Why does it only return the player's name and the "target"?

game.ReplicatedStorage.Events:WaitForChild("WantedListAdd").OnServerEvent:Connect(function(target, Reason)
    local wantedListTable = {}
    table.insert(wantedListTable,1,target)
    table.insert(wantedListTable,2,Reason)
    print((wantedListTable[1]), (wantedListTable[2]))
end)

Answer this question