Win System (Need Help)

Hello, guys! I am trying to achieve making a win system like in arsenal.

The problem is that I don’t know how to make it because I don’t know what I need to do.

I tried searching youtube but I couldn’t find it anything.

Examples:
image
image

Thanks for reading, I am waiting for replies.

1 Like

Let’s start from scratch:

  1. Design your UI till its finished
  2. Make sure there is a text label for CareerKills value and username
  3. Make a function that sends the player’s Username and CareerKills
  4. make the function set the 2 text labels to their new text
  5. Get UserId and use that to get Avatarthumnail and place it in ImageLabel!
1 Like

Script I would use:

function LoadWin(Player)
    local CarrerKills = gui.CarrerKillText -- Carrer Kill Textlabel
    local UsernameText = gui.UsernameText -- Username TextLabel
    local WinnerIcon = gui.WinnerIcon -- Player ImageLabel
    local Thumnail = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) 
    --Gets Player Thumnail--
    WinnerIcon.Image = Thumnail -- Sets Icon
    UsernameText.Text = Player.Name -- Sets Username
    CarrerKill.Text = Player.CarrerKills.Value --Sets CarrerKill


end)

◇Wrote all of it in DevForum so could be spelling mistakes!

1 Like

Just like @DonKingFrog said, you just need to get the biggest value (Kill) from the player, and make a function that UI will be show who has the biggest value

1 Like

And if you don’t understand how I get career kills this is how:

When Player enters add a IntValue to their player named CarrerKills:

game.Players.PlayerAdded:Connect(function(Player)
    local CarrerKills = Instance.new("IntValue",Player) -- Makes Int Value / Places inside Player
    CarrerKills.Name = "CarrerKills" -- Sets the name
end)

And every time a player kills someone adds a point:

function killedPlayer(Player)
    Player.CarrerKills.Value += 1 -- Adds 1 to whatever is inside it
end)
1 Like

Thanks so much for helping me! But I have a question. What do you mean at the step 3?

What he meant was displaying Player Username and CareerKills into the GUI (Screen)

1 Like

I did what you said but it doesn’t work.

local gui = game:GetService("StarterGui").ScreenGui.Frame

game.Players.PlayerAdded:Connect(function(Player)
	local CarrerKills = Instance.new("IntValue",Player) -- Makes Int Value / Places inside Player
	CarrerKills.Name = "CarrerKills" -- Sets the name
	
	local char = Player.CharacterAdded:Wait() or Player.Character
	local hum = char:WaitForChild("Humanoid")
	hum.Died:Connect(function()
		local tag = hum:FindFirstChild("creator")
		local killer = tag.Value
		
		killer.CarrerKills.Value += 1
	end)
end)


function loadWin(Player)
	local CarrerKills = gui.CarrerKillText -- Carrer Kill Textlabel
	local UsernameText = gui.UsernameText -- Username TextLabel
	local WinnerIcon = gui.WinnerIcon -- Player ImageLabel
	local Thumnail = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) 
	--Gets Player Thumnail--
	WinnerIcon.Image = Thumnail -- Sets Icon
	UsernameText.Text = Player.Name -- Sets Username
	CarrerKills.Text = Player.CarrerKills.Value --Sets CarrerKill
end

while wait() do
	loadWin()
end

Is there any other we that we can contact so you can show me how to solve that or what?

Is this inside of an local or server script?

1 Like

this script is a server script

Server-Sided

► Adding IntValue
► Adding Values to CarrerKills
► Fire Remote Event when the round ends sending Winner

Client-Sided

► Recieve the Remote Event with the Winner Player
► Using the function with a given player once
► Don’t use a while loop it’s unnecessary since the text will stay the same till the next round ends.