saveChange:InvokeServer("Position", tonumber(selectedPart.Name), selectedPart.Position)
function saveChange.OnServerInvoke(editingPlayer, id, property, value)
if editingPlayer == player then
print(player, id, property, value, type(id)) -- Output: Ashk3000 Position 1 -5.001445770263672, 0, 0 string
saveData[saveNumber][id][property] = value
saveInstances[id][property] = value
end
end
I am having an issue where I am using tonumber() but type() shows it is still a string. I also get this error
ServerScriptService.SaveData:69: attempt to index nil with number
on both lines where it saves the value. please help.