I was testing my leaderboard, and look what I came across:
It’s trying to index a property of the ‘Team’ object which I inserted (I was using ‘Team’ because it had the TeamColor property, which my leaderboard uses) and because of that, it’s erroring.
Relevant part of code from GameServer.ashx, with the changes commented:
if placeId~=nil and killID~=nil and deathID~=nil and url~=nil then
-- listen for the death of a Player
function createDeathMonitor(player)
if player.Character then
local humanoid = waitForChild(player.Character, "Humanoid")
humanoid.Died:connect(
function ()
onDied(player, humanoid)
end
)
end
end
game:GetService("Players").ChildAdded:connect( -- This should be changed to '.PlayerAdded'
function (player)
-- Or preform a check to make sure that the child actually is a Player object.
createDeathMonitor(player)
player.Changed:connect(
function (property)
if property=="Character" then
createDeathMonitor(player)
end
end
)
end
)
end
