|
| 24 May 2013 04:23 PM |
I am currently laying out the framework for a TDM gamemode in our fps. I want it so that each time a team gets a kill, a gui showing the total of kills a team have will update. How would I track the kills/deaths of a player?
Cheers. |
|
|
| Report Abuse |
|
|
sTvcs
|
  |
| Joined: 24 Jun 2012 |
| Total Posts: 704 |
|
|
| 24 May 2013 04:23 PM |
| Get players, find the kill value for each, iterate and sum them together |
|
|
| Report Abuse |
|
|
|
| 24 May 2013 04:34 PM |
Since I am not an experienced scripter, could you please give me that in script form? I don't know how to "get players". Also, this framework would be in as script in the workspace. How would I have the kills/deaths apply to the GUI?
Cheers. |
|
|
| Report Abuse |
|
|
| |
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
|
| 24 May 2013 06:12 PM |
I could be wrong but give it a try:
while true do for _, player in pairs(game.Players:GetPlayers()) do if player.Character.Humanoid.Health == 0 then ScreenGui = Instance.new("ScreenGui", player.PlayerGui) Window = Instance.new("Frame", ScreenGui) Window.Size = UDim2.new(0.5,0,0.5,0)\ end end end |
|
|
| Report Abuse |
|
|
|
| 24 May 2013 06:26 PM |
I'm not sure what what does. I already have the GUI, don't need to make 1 with script. I just need to get the kills 4 each team and total it and put it on the gui.
Cheers. |
|
|
| Report Abuse |
|
|
|
| 24 May 2013 09:38 PM |
bump...PLEASE HELP!
Cheers. |
|
|
| Report Abuse |
|
|