Is it possible to make an in-game stats gui? For example, showing how many kills you have. The KDR, and the team which is winning or losing?
Sure it is.
game.Players.PlayerAdded:connect(function(Player) local LS = Instance.new("IntValue", Player) -- LS = leaderstats LS.Name = "leaderstats" local Kills = Instanc.e.new("IntValue", LS) -- (ClassName, Parent) local Kills.Name = "Kills" local Deaths = Instance.new("IntValue", LS) Deaths.Name = "Deaths" end)
now in a ScreenGui
add a script and a textlabel
local Player = game.Players.LocalPlayer local Stats = Player.leaderstats local Kills = Stats.Kills local Deaths = Stats.Deaths local KDR = ( Kills.Value / Deaths.Value ) local TL = script.Parent.TextLabel local Team1 = game.Teams.Team1 local Team2 = game.Teams.Team2 while wait() do if Team1.Score > Team2.Score then TL.Text = "K/D: " .. tostring(KDR) .. " Winning Team: "..Team1.Name elseif Team2.Score > Team1.Score then TL.Text = "K/D: " .. tostring(KDR) .. " Winning Team: "..Team2.Name end end
Yes, it is possible to do. You would have to save their stats somehow and just display it in GUI form.
You could insert BoolValue to handle the Kills and Death, and get them through a LocalScript, and display them through a TextLabel. It would be moderately challenging, but not impossible.
Closed as Not Constructive by evaera
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?