So I'm making a gui that depending on the player's cause of death they get shown a different message when they go back to the lobby, but whenever they get teleported back they get an error saying "attempt to index number with death", here is the piece of code that's causing problems:
local teleportData = tps:GetLocalPlayerTeleportData()
if teleportData then
print(teleportData.death)
local r = teleportData.death
print(r)
local v = textTable[r]
local plr = game.Players.LocalPlayer
Whenever I teleport the player, I am sending a number, but somehow the script doesn't want to receive a number. Also it fully works whenever I put a normal number manually, help?
(the error is on line 6)
