Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isnt this player kill script working?

I assume that teams automatically give each side +1 per kill. Now I have a script(below explanation) inside a text label that says if a team scores a point it would show as 1 point on the text label. How would I make this work and if possible make it for ever player killed by team play add +1 to the gui? Script:

if game.Teams.Atlas.Score == 1 then
	script.Parent.Text = "1"
end
if game.Teams.Atlas.Score == 2 then
	script.Parent.Text = "2"
end
if game.Teams.Atlas.Score == 3 then
	script.Parent.Text = "3"
end
if game.Teams.Atlas.Score == 4 then
	script.Parent.Text = "4"
end
if game.Teams.Atlas.Score == 5 then
	script.Parent.Text = "5"
end
if game.Teams.Atlas.Score == 6 then
	script.Parent.Text = "6"
end



1 answer

You don't need to create an if/then statement for every number. Using while true do or while wait() do you can execute what you want

while wait() do
script.Parent.Text = game.Teams.Atlas.Score
end

4 comments

0

Thanks but how would I get my script to add points for each time they kill a player?

0

Oh thats depending on if the gun provides that function, you would have to find if it does.

0

okay so assuming the player's team gets points per kill, Why wont my script work? I dont feel like going through the gun scripts lol

0

Well, you're going to have to, no other way of telling.

This discussion is preserved as it was. New answers, comments, and votes are closed.