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

I made this, but it wont print out any errors, and the output dose not give any errors?

numtble = {}

function Check()
repeat wait() until game.Players.NumPlayers >= 2
for i,v in pairs(game.Players:GetPlayers()) do
table.insert(numtble,v.PlayerGui.Points.Posy.Numbers.Value)
wait()
print("Awesome2")
wait()
end
end

function Check2()
for i=1, #numtble do
if i > 2 then 
if numtble[i] < numtble[i] - i then 
dum = numtble[i] - 1
table.remove(numtble,dum)
elseif numtble[i] < numtble[i] - i then 
table.remove(numtble,numtble[i])
wait()
print("Awesome")
wait()
end
end
end
end

function Winner()
Check()
Check2()
for i,v in pairs(game.Players:GetPlayers()) do
if v.PlayerGui:findFirstChild("Points"):findFirstChild("Posy"):findFirstChild("Numbers").Value == numtble[1] then

v.Character.Head:Clone().Parent = game.Workspace
wait()
end
end
end

Winner()

1 comment

0

Alright, this is supposed to go get a value in a gui in all players, and set it in a table, then go through the table and take out every number except the highest number, and then clone the players head with the highest number, righ now its either not removing the numbers from the table or my logic is wrong, the updated version of the code has been edited on this please help

2 answers

Are the functions called in the script elsewhere? Assuming they are, I am not sure if

numtble[i] > numtble[i] - i

is the correct way to write that. Maybe

numtble[i] > numtble[i-1]

2 comments

0

No, should they be?

1

In order for copy to run you would need to put copy() underneath that final end

You're defining a whole lot of functions, but never calling them. Try at the end just adding: copy ()

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